Thanks, your reports helped a lot. It's fixed now, all your factories should work again.
Storytime: Due to a copy-paste error in my code, the factory energy buffers were created with nil force, so they got assigned a default force, which happens to be the enemy
force.
Chunks are recharted every few ticks in the bright area on your map, but only whenever a change that could affect the map view has occurred in the chunk, such as the construction or deconstruction of some machine.
Every single time a chunk is recharted, the BitersBegone mod indiscriminately deletes every single entity of enemy
force.
That's why the power always went out a few ticks after you changed anything in the factory building: every time you built something, the map changed, so BitersBegone deleted the power supply.