That's happened quite a number of times.
Although we have discussed a number of times that if the government is going to pass a $1 trillion infrastructure bill, it would make sense if it was for something like hardening the grid to protect against something like this. Of course it is just spent on pork.
“Hardening the grid” against the power of the sun hasn’t been designed yet.
Backups and contingency is pretty much the only way.