I believe the US already tracks (or attempts to track) anything resembling a missile headed our way, and there are systems that can take these down before they detonate and cause problems. You can't exactly "stop" a solar flare from hitting Earth. Additionally, we can also use diplomacy to create the conditions where China (or anyone else) won't want to EMP us (or at least won't benefit from doing it, even if they do want to), but we can't do that with the Sun.
And that's where my point on prioritization comes into play. We're more likely to invest in technology like Israel's Iron Dome to prevent an EMP from another nation than we would a full scale re-build of the grid to mitigate what amounts to an act of God from the sun.
Of course, the harm to their own systems would be substantial as well given that it would have a huge impact on satellites in orbit, not just systems on the ground.
But yea the mutually assured misery that it might cause in LEO for everyone would make this only likely form a truly rogue state. Maybe NK, but trying to identify who the threat would be changes this from a solar flare risk/mitigation discussion fully to a geopolitical theory one ;)
Well, the reason I point out LEO is that Starfish Prime was detonated at 250 miles, that's within the range of a low Earth orbit. You don't need to return anything to Earth to have the desired effect, or even have it on an Earthward trajectory (such as deorbiting the satellite).
EDIT:
> would make this only likely form a truly rogue state
I do agree with this.
Can't we really? AFAIUI it's mostly charged particles coming in relatively slow, or rather us/Earth entering their path, like walking into a lawn sprinkler.
Not Gamma-, or X-Rays hitting us directly at the speed of light.
Now imagine a cluster of satellites which puts them in orbit between us, and the Sun, or rather enough of them in front of Earths surface at dawn. Because that side is 'forward' on Earths track around the Sun.
These sats could be mostly dormant, to be set in rotation, unspooling really long thin wires, electrically charged by whichever means. Like a giant electromagnetic umbrella. Slowing the stuff down, or diverting it outright.
I think that would be valuable, even if they would have to be discarded after 'one time use'.