I recommend a way to have factories automatically maintain a minimum level of what they can produce. This would probably be a feature that costs deuterium.
You would set the minimum value you want an item to be in a factory. Each factory could have their own minimum value that can be set.
In this way, if the starbase is attacked, and stocks of weapons are stolen, the factories could start making replacement weapons, starting with the lowest value weapons.
Or, explorers who keep vanishing during explorations could be rebuilt by cyborg factories - a perfect companion to auto explore.
Or, even a way to replace spies that get killed during invasions.
And especially minibot production since we lords probably want a way to maintain that at a certain level.