I've sprayed an engine with a hose. Try to avoid areas where wires connect...but it doesn't matter that much. The most important thing to remember is to make sure the engine is cool. If you spray it just after turning it off, the sudden contraction from going super hot to cold can crack it. As far as spraying the engine itself...GO TO TOWN! It is air tight (otherwise the engine would not work right).
A buddy of mine works on electric lifts and such, and I have seem his use a hose to clean corrosion off a battery, while it was on the car, then started the car.
Meguires NXT is a good wax, but it does not last very long.