I also suggested something similar a while ago. The idea was once it was decided which players would be in the game (using the current logic), the AI would make a pass through each defensive position, ordered from most to least specialized/important. Something like C, SS, CF, 3b, 2b, RF, LF, 1b.
Step 1- of the 8 defensive players (excluding pitcher), put the highest catcher on the defensive depth chart at catcher (moving to catcher if he was playing a different position)
Step 2- of the 7 remaining players, have the highest SS on the defensive depth chart play SS (moving to SS if he was playing a different position).
Step 3- of the 6 remaining players, have the highest CF on the defensive depth chart play CF .....
etc.
The only loophole left to close would be what happens if there's no players on the defensive depth chart for that position when it's checked for a particular step. Should that trigger an additional substitution off the bench, or should the AI just make due with whatever player is left over at the end going into that position?