That's a valid point. I guess in my mind an EMP is an act of aggression that has viable ways of being stopped (as opposed to mitigated) whereas a solar storm is agnostic to anything happening on Earth. Even if the mechanism is similar, they are different problems with different solutions.
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.
> but we can't do that with the Sun.
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 in direct line of sight.
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'.
If an enemy nation wanted to conduct an EMP attack, they wouldn't need to do it with an ICBM that we'd be able to identify as such. Getting an object into LEO would not, on its own, stand out, and would provide an avenue for attack (or the threat of an attack) that would not be detectable in the same way as an ICBM launch.
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.