Section 36A. Any domestic life company or any domestic company transacting business solely under subdivisions (a) and (d) of clause sixth of section forty-seven may establish a plan for retirement or insurance benefits, or both, for agents, or any class or classes thereof as the company may determine, having a written contract with such company or with any agent thereof under which he solicits exclusively applications for policies of life or endowment insurance or annuity or pure endowment contracts or accident and health insurance issued by such company, and for the agency employees of any agent having such a contract; provided, that qualification requirements for such plans and the determination of the amounts of such retirement benefits shall be based exclusively upon the solicitation and sale of life or endowment insurance or annuity or pure endowment contracts or accident and health insurance for such company and shall not in any manner directly or indirectly be based upon the solicitation or sale of any other kind of insurance by said agent. Any such plan may provide for contributions by such agents and agency employees. The word “agent” as used in this section shall, in case any such contract is held by a partnership or corporation, include any member of such partnership or any officer of such corporation. Such retirement or insurance benefits may be provided for in a group annuity contract, a group life, or a general or blanket accident and health policy, or in a single group policy, issued by such company, if authorized to issue any such policy or contract, or by any other company so authorized, or in any other manner that the directors of such company may prescribe. If any such benefits are provided otherwise than by any such group policy, the company may in connection therewith establish special funds for the purpose of financing the payment of such benefits. The provisions of the last sentence of the third paragraph of section thirty-six shall apply to any person covered by or insured under any such group policy or contract issued by a domestic mutual life company. The provisions of section one hundred and thirty-two C shall apply to any retirement benefits granted under the authority of this section or section thirty-six. Section one hundred and thirty-five shall apply to any insurance benefits so granted.