Have battery backups in turrets, which charge up while there is power to spare, and discharge when power is lost, providing the turret with power for a short time, so you have a chance to restore power supply. It would also be good to be able to prioritise power supply, so in a low power emergency, you can keep your command post and turrets powered, but power down non essentials, such as reffineries and factories.