OK, the best thing to do with EMP Guardians is to take them out as soon as you find them. But inevitibly, one is going to slip through.
So how do you prepare for it? The standard techniques of turrets, forcefields, and standing ships won't do, as they all get EMPed. Well, I found two good counters for it.
1. Starships (or greater). Starships ARE immune to EMP attacks. So are golems, spirecraft. Keeping one or more of them around on an important planet (like your home) to take out the most dangerous threats and stall for time is a VERY good idea.
2. Fortresses. Fortresses are also immune to EMPs, and are great at defending against everything but bombers. If bombers start rushing something important, you'll need to have something else stationed on that planet that can stall them.
Keep in mind, you will probably be unable to take out all threats during the EMP period. As such, your goals are twofold.
1. Kill the EMP Guardian with these counters before it can move to another planet and make the problem worse
2. Use the counters (who are immune to EMP) to stall for time until the power comes back on.
I had to put in some serious thought about all this after an EMP guardian and a Spire starship nearly destroyed my home. Only a very fortunate last second EMP duration expiration saved me.