I'm not gonna try to answer the question of how you get good officers in the real life miltary. Every possible scheme can be shown to produce the same sort of stinkers. No system is perfect, and humans who want to 'get ahead' will always find ways to cheat the system and get a rank they don't merit simply because they feel they 'deserve' it.
But as for the game, I think that troop experience should be handled exactly the way I have recommended that ship experience be handled for SE V. You have a global 'pool' of experience and it is averaged into your troops/ships. There can be an option to designate certain units as 'elite' and pay extra maintenance to keep them at a certain amount higher than your average experience level, but beyond that no modifications or single unit (ship) tracking. Experience comes from military academies and actual combat. Experience is lost when you decommission units (ships or troops) or lose them in combat. Simple, effective, understandable by the AI. And it makes your 'level of military readiness' a strategic resource much like it is in 'real life'.
It's
slightly unrealistic in that various units will not be absolutely identical in experience in 'real life' but in practice they tend to be pretty close. This is because ships do not carry the exact same crew members for 10 years or more at a time (Star Trek not withstanding) and military units do not have the exact same members for 10 years or more at a time. People shift assignments constantly in the military,
on purpose. They deliberately try to spread experience around to prevent the sort of disparities that some people would like to track in a 4X game.
So I'd very much like to see a simple pool of experience representing your number of trained/experienced personal and their level of experience rather than trying to track individual units.