This isn't always the case... In an attempt to improve GHG emissions, many facilities are going to electric drive compression. Given that many of the big producers out there have net zero GHG goals for the future, this will become the norm. The facility that I work at is all electric driven compression and has 2 back up generators that run weekly for 15 or 20 minutes. One is for the admin building and 1 is for the plant emergency systems.I’m not so sure about losing natural gas. It’s pumped with natural gas compressor engines. My only concern would be the computers that control all the safety devices, monitoring systems etc. but they will have generators to run that stuff too.
Some producers are taking it to the point of shutting wells down if a midstream company has an upset at a compressor station and isn't able to take the gas from the wells.
ETA: Our backup Generators are diesel powered.