Employers almost universally frown upon that, potential liability for tax withholding, mandatory insurances, and just engaging some body of law that you don't fully understand is too great. Health insurance is just part of it, you have the same issue with income taxes, retirement pensions and it's not only your problem, the employer may very well be liable to collect some of it on the state's behalf. In practice, some employers will just feign to ignore that you are spending a few months away from home but they will not want you to live full time in Portugal.
In my experience, over the last few years many German employers in particular have created explicit rules like “you can spend at most x days per year out of the country while working remotely” (with x something like 30 or 55), precisely because nobody is able to say how things should work in the situation you envision.
Another possibility is to be (re-)hired under a Portuguese contract (with a local entity belonging to your German employer, an employer of record or umbrella company, or as freelance). That's not unheard of and I understand from colleagues who have done it that there are some tax advantages to that setup.
Either way, the consequences for the employers are significant and they have to support your move. And once you have found a solution that work for them, the problems you are asking about will probably present themselves in a very different light.