From my understanding the way the unit generation works is when a pop slot becomes available then the game engine scans buildings looking for a unit that will fit the available pop. When it finds one that gets created and the game engine goes to the next building. If it finds a unit too large (siege units almost always are) then it goes to the next building. The siege and MUs are left queued forever (this happens mostly in DM I admit).
What I suggest is that when multiple buildings are queued with units the game engine starts at a building and will produce that unit once the pop becomes available for it. Upon being created then it goes to the next building and waits until it can create that unit and so on. Siege and MUs will be created and it should have minimal affect to normal units.
Sometimes I just hold a front line until my siege is produced and during those times I can't do anything without it.