People need to ignore all the false claimed from the Electricity sector, institutions, etc about the government having the capacity to shut down Bitcoin mining or Bitcoin cause they are doing this to cause fud. If it happens that the government shut down mining a lot of different ideas about Bitcoin mining have been put together to save Bitcoin from the rainy day which lightning is one of them.
Why though? I mean if electricity grids really did shut down, it will pretty much shut down bitcoin and all the things that are depending on electricity, don't mistake FUD with reality because just because it says something negative about bitcoin.
If the electrical grids really did shut down, we'd have a lot more problems than bitcoin mining. Air conditioners, doctor's office, hospitals, roadways (no lights), no pumps for gas stations, no pumps for water the internet, etc. would all cease to function. (And bitcoin mining would just slow down or freeze or migrate somewhere else). Sure a government could shut down an electrical grid, but the populace would shut down the government. (Unless it was something like a "One Second After" scenario).
Shutting down the grid wouldn't be a viable way to stop mining.