I'm currently writing a book and need help working out a possible solution to a problem I'm having. The world is almost completely automated and, therefore, a solar flare large enough to knock all the world's electronics would definitely spell the end of everything. In this world all of the world's resources can be directed towards individual tasks at once if need be so thinking big is not a problem here, the planet is totally unified. The best I can think of is either to install circuit breakers in all electronics and some mechanism that would restart everything after a few hours or install some sort of huge magnetic installation that uses immense amounts of power to boost the planet's magnetosphere enough to deflect the incoming solar flare, activating as soon as jumbled radio signals indicate a solar flare is headed our way. Also, a long term plan in this book is to build a Dyson sphere (actually a Dyson swarm) so now could this also be protected from solar flares.
If my science is way off and I'm not actually making sense just explain to me where I'm going wrong. My interest in science is recreational, I actually study languages haha.