Possibly; my experience here in lightning country is that house grounds can be a long run to the ground rod; a surge protector can be helpful, but if the lightning hit is nearly direct everything is going to be fried. The power cord is another issue in an EMP, but I read that microwaves make good impromptu Faraday cages so I am reaching above my pay grade I suppose. Magnetic field surges require some special engineering experience.
Certainly microwave ovens are well sealed against outward leakage of the microwave generation; magnetic field intrusion is, as I say, not my field of expertise.
I conducted a test, perhaps irrelevant to the EMP case. I put my iPhone in the microwave and tried to contact it with my Apple watch. Contact was achieved.
At least at high frequency (2.45 GHz Bluetooth), a microwave oven is not an effective Faraday shield, which you'll find if you Google microwave oven and Faraday shield. All microwave ovens leak, but not enough to harm people.
What was surprising to me is that the RF frequency used by microwave ovens is exactly the frequency used by Bluetooth: 2.45 GHz. No wonder Bluetooth is so fricking unreliable. It's also very close to the standard WiFi frequency of 2.4 GHZ, which is why microwave ovens often interfere with WiFi.
A faraday cage distributes the charge on the outside of the container, whether it is grounded or not.
Anything inside is protected
But grounding is not a bad idea too.