You should also be overproducing officers of all types so that 1) You have replacements for any lost to accident, illness or combat, 2) You have an increased chance of having officers with decent bonuses to fill the various positions, 3) You have a pool of officers ready fill positions created by expansion. You should probably also look into the Academy Commandant system, as that allows you to influence what types of officers you get, and even what skills they have, to an extent. If auto-assignment can't fill your roster, you probably need to increase your officer generation, or at least use Commandants to increase the average abilities of the officers you are getting, and likely both