Similar to the lightbulb idea, I use the heater bars used in gun safes to raise the temperature (thereby decreasing the humidity / raising the dewpoint inside), a 12" or 18", on each side of the engine, and one under the heater core.
They get about 160 degrees, not enough to melt something or start a fire, they are waterproof, and designed to be run 24 hours.
They won't burn you, but you would not want to hold one for too long, they are pretty toasty!
The premium name is GoldenRod, they are not cheap, but now Goldenrod has a budget version that is $20 for either a 12" or 18" (longer=more heat).
A 12" one heats a 100 sq. foot area, the 18" heats a 200 sq. foot area, so the engine compartment is nice & toasty.
One would be plenty for the engine compartment, but 2 is cheap insurance.
I just mount mine permanently, and leave them in there year around, connected to the same plug as my battery trickle charger. They come with 2 little clips that hold the rod about 1" above the surface when mounted.
When I put the boat away, I plug it all in...helps keep the mold & mildew down, even in the summer.
I have had one of the gold colored ones in my safe for 11 years now, 24/7, and it is still going strong.