The lazy way is to limit yourself to "mirrorable" characters - AHIMOTUVWXY and 180.
But I'm sure you'll come up with a much more robust solution.

I just hope that you can make it so that every ship in the same class doesn't appear with the same number (although I know SH3 chooses one of three class skins, so that will help a bit).