I doubt I have the expertise to understand the difficulties. Not enough experience adding to established code to wrap my head around it.
The outlets of a building can be nodes in a tree. The tree represent an electrical system that can update outside of the bubble but only gets activated when part of the tree, an outlet, is in the bubble. Flipping the tree to active is as simple as using quick find to find the tree root of the outlet and turning it on. Even if smaller trees representing subsystems were used it should not take too long to find the root. As long as it does not go too deep. Assuming the wiring does not have separate circuits might make it even simpler. Separating a subtree to a new tree, due to outlet destruction, can be quick as well. It means creating two or three separate trees that now run on their own, and checking their nodes to see if at least one is in the bubble. Outlets do nothing beside representing a union so I assume it would simply slow the map loading in a bit.
The tree keeps track of the producers and consumers in the system. Those could also be a separate tree added to the outlets through quick union. They would probably need to be aware of which outlet they are on but adding to root is faster. If an outlet gets destroyed find its root, separate outlet trees, and make what was connected to the outlet it’s own tree again. Each producer adds to the tree’s total energy and each consumer reduces it. Since the tree handles the update of them, the difficulty of it might be in saving and loading data that comes from outside the bubble.