What people forget in their panic is that for most, China included, it’s too costly in the effect category to pull off such a stunt.
They lose out to much. Sales of goods, theft of technology, somewhere to dump their unwanted “persons” without killing them. They hurt themselves as much as the US, much as they hate us, they need us.
Outside a “rogue” nation or terrorist attack, the chances of a nuclear EMP event are very slim.
Now a “Carrington Effect” event, that’s another kettle of fish.