When making maps, ensure you use the correct sequence of start locations, i.e. 1-4 for 4 player maps, instead of 1-3 and 7.
Skipping a player/color when making maps has always been a feature that never caused any issue with the original game. The game would just ignore the unused slots and count the used ones only when considering starting positions available to players/ai. Players didn’t even need to have a unit placed by default as long as the starting position was over a tile a peon could be spawn in with the one peon only start condition.
Many maps are designed and made that way, even Blizzard official maps were made like that.
It should be trivial: Parse the PUD file look for starting positions put them in a list/array/vector whatever, and use that array to know how many players can be spawned what color they are etc…
randomly pop one element of the array until no more player needs a starting position not every color being used should not cause any problems…