Honestly I'll probably be replacing the ammo factory completely and stop using Contraptions builders all together, they are just far too unreliable (as we can all see from the issues surrounding every plot that includes a builder! :P)
If I may, I have a possible solution for you.
I really like using contraptions builders, but as anyone that uses them knows they have issues.
I determined that most of these issues occur when the contraptions builders are powered, active, and the player is not in the settlement (but possibly close enough that the cell is still loaded). I would return to find - well - smaller versions of the mess in the OP.
My initial solution was to put in a power switch, but on occasion I would forget to turn it off on my way out of the settlement.
My final solution which is currently working extremely well was to make the contraptions builder only active when the player was *close* to them.
The autodoors mod has a sensor that transmits power if there is a friend or foe nearby (user configurable detection and radius). I set it to run power if there was an ally withing 1000 units of the sensor, to a regular switch that I can disable manually if needed.
Now, the contraptions builders only activate when I am nearby, and once I leave the immediate area they shut off. No more issues with the builders.
Perhaps you or
@kinggath could implement something similar ? Have the factories only begin their animations when a player is within 1000 or so units ?