Just have it professionally steam cleaned by a professional auto detailer if you're that concerned about it.
And any electrical problems can be avoided if you simply disconnect the battery before you wash it and prep the engine bay properly (remove any 'covers' that might trap water and prevent it from completely evaporating like coil pack covers, block intake path, plastic bag over alternator, etc.) and allow ample time for all the water to evaporate before reconnecting the battery.
About the worst I've ever had is a misfire condition from water working its way into one of the spark plug recesses, but with my hood design, this could just as easily happen in the rain. No big deal, just scan the OBDII for which cylinder it is, and blow it out with some air.
The stuff in an engine bay is more robust than people give it credit for. It's designed to accommodate heat, cold, rain, dust, dirt, oil, extreme vibration, or any otherwise hostile environment for years and years. Anything sensitive like delicate PCBs are usually packed in solid resin or otherwise water proofed in a self contained module housing.
A little water isn't going to hurt anything, but I wouldn't use anything higher pressure than what you'd be willing to use on your paint job or hold the nozzle point blank, and don't spray it deliberately at places like the alternator or distributor that you covered with a bag or a relay or breakout box or something like that.
I'd worry more about vacuum hoses and fittings and possibly blowing them off with pressure and getting water in the lines more than anything else though, just don't get too close and use a wide low powered nozzle. And take the time to throughly inspect and dry everything, especially concave or recesses areas that can pool or trap water.
I think people are overly sensitive sometimes I think when it comes to the perceived delicacy of underestimated electronics. There was a guy who was using a PC while doing an experiment that involved submersing the PC in a turkey tray in boiling vegetable oil...