Need a switch/circuit breaker that stops power supply to equipment when power comes back after outage
Consider using a COTS item called a Magnetic Switch commonly used in conjunction with wood working power tools.