I'm more for genetic engineering over nano machines as being a likely solution to these issues in the future. Beyond the moral implications genetic engineering is already done on a large number of different systems, the only science fiction part would be what genes from where were used to make up for difficiencies. Would require that you find out about organisms or at least a clever combination of proteins from different organisms that would deal with each issue you mentioned. Wonder if there's any organism that has a heightened ability to repair DNA. I know there are DNA Polymerases with different chances of mutation causing errors so it's possible that one that's less error prone than the Human variant could be used to decrease diversity as you mentioned. I'll have to think about this more one day out of curiosity.
If you want something that can be controlled by an outside AI I imagine it might be possible (if we knew everything there is to now about protein structure and function) to genetically engineer protein synthesis systems into everyone which are designed to only work on plasmids with a certain leader sequence included. Assuming that you knew what type of protein you needed for any given issue and DNA synthesis was trivial and could be done on a tiny scale you could then have every person wearing an automatic plasmid creator and injector which will then encode proteins that the protein synthesis system you added to each person will recognize and create to solve whatever problem arises. The issue then would be coming up with a reporter system so that injector would know what medical issues are arising. I'd have to think about that last bit some more.
Just some random thoughts as it's fun to consider the possibilities, best of luck with your story.
...









