Not sure if I follow your description entirely yet (which might be why nobody else has answered your inquiry yet). I'll try to paraphrase what I think you describe as your problem:
1. you have worked for three years in Germany for a German company, i.e. you have paid through your salary for (probably public)
health insurance, unemployment insurance, public pension and so on, right?
2. now you could/would/will change your employment so that you are employed through a foreign company where social insurances are paid in Slovenia and you want to pay income tax in Germany, correct?
3. you fear that this could endanger your "status" in Germany, notably your German health insurance coverage?
O.k.: normally (there are of course many legal and grey-zone exceptions to that) you can only be employed in Germany from abroad when you are "Entsendet" which means that your new employer has to send you to Germany to perform/work on a certain project where the procject and the project time are clearly defined. Otherwise your employer should open a "selbstständige Niederlassung" (i.e. a subsidiary branch) in order employ you according to German law and regulations and social fees etc. Which is of course very unattractive for a foreign employer, I understand that. But from the side of the German governement the questions is: why should you or the employer enjoy a number of German infrastructure and social benefits without contributing to them. So, for a while, a couple of years, this might work but eventually someone will want to know more about how this is working out
Since you do not tell us what your status exactly is, it is kinda hard to judge if your status is in jeopardy through the move you propose to do. Generally speaking: if you are not employed under German law/regulations, you could only remain in German public health insurance if you would have the status of a self-employed/freelancing person. I don't quite see how you could get on top of the Slovenian public health insurance a German public healt insurance as a foreign employee.
If this could complicate your residence permit or anything like that would also depend on how your current status is, if you are an EU-national or not etc. If you could be more specific in your inquiry, more people might actually be able to help you. Having said that: I do of course fully understand that to phrase your problems might be hard through not only language barriers but also because of the complexitiy of the systems. When in doubt rather try to provide too much then not enough info in order to get a good reply here at Toytown.
Cheerio