I mist the engine with water, then spray with Gunk engine cleaner, spot clean with a brush or microfiber, rinse with mist setting on the hose and dry any pools of water afterwards run engine.
Once dry, my goto was CD2 but now I'm using Chemical Guys Black on Black as a dressing for plastic and hoses.
I have not had any issues with moisture / water getting where it shouldn't, just requires some common sense. I use a pressure washer turned down, widest nozzle.
Snowfoam and high pressure rinse.
If any stubborn dirt remains then it's cleaned with a strong all purpose cleaner or degreaser and a brush.
I apply a 4% mix of Bilt Hamber Atom Mac to the entire engine bay for anti corrosion.
Then while wet I apply a water based stressing everywhere.
Take the car from a drive to dry off the engine bay and when I return I get a microfibre cloth with a light spritz of the water based dressing and just give everything a wipe down.
Start this early on in a car life and the engine bay will look brand new right up until it's ready for the scrap yard!