I live in Germany, it's not as complicated as it sounds like you think it is, but you're mixing up two different concepts.
Anyone who is employed and earning less than a certain amount a year (I can't remember the cut off, I think €60k?) gets state health insurance. It doesn't matter if you're German, European, American, all that matters is that you have a job which pays more than €450 a month. (Anything less is counted as a mini-job). Your employer will sort out this insurance for you. AOK is one of the companies offering state insurance. I'm with TK. Through this employer-subsidised insurance, any dependants, so children, adolescents in education and non-working spouses, are covered. Again, it matters not a jot where you are from. State insurance is always 14% of your wage no matter how many people are included on it, and it covers any normal healthcare, whether that's emergency or routine or elective.
The only time you get into NI contributions etc is when you're NOT employed and NOT married to somebody who is employed. I had this problem when we first moved because I'd been studying and working part time so I didn't have NI contributions except for as receiving child benefit and I can't remember exactly why but anyway I wasn't covered by the reciprocal arrangement. I was advised by somebody to get travel health insurance, as I was planning to get a job ASAP. You can only exist on travel health insurance for about 6 months IIRC but it fills a gap.
The EHIC is a totally separate thing and simply covers emergency health care if you happen to be visiting another European country, whether that's a holiday or a hop across the border or you work in the second country. In Germany your EHIC is printed on the back of your health insurance card, in the UK of course you have to apply for one, because there is no NHS card.
After Brexit the first part, state health insurance will stay the same since they don't look at previous healthcare or any contributions, it's the same for anybody living and working in Germany and only based on employment status (or eligibility for unemployment insurance). It might be more difficult if you're self employed or unemployed and not married to somebody who is employed, but we don't yet know how this will work out. It's fairly likely that it would revert to whatever status immigrants from outside the EU have now. I believe people in this position have a harder time working as self employed but most companies are understanding of this and will just offer you a contract with visa, it's easier for them anyway.
As for your EHIC that will be affected but again we don't know exactly how. I think it's likely that it will just cease to exist from the UK meaning that if you want to travel to an EU country you'll need travel health insurance just like you would when you travel somewhere outside of the EU. But if you move to Germany then you'll get a German EHIC which you can use in France, Italy, etc - and you'll need travel health insurance when you visit the UK.