Hi:
Several years ago, when researching auto sound proofing for a new Scion Xb that I wanted to make much quieter than Toyota designed (and the outcome was very successful!), I learned that it comes in two forms: Noise reduction and sound deadening.
Sound deadening is what works for keeping panels from resonating. Resonating panels equals noise. The foam/foil type cuts the original noise, but I think is too light to prevent panels from resonating. A sailboat diesel engine does a very good job setting everything into resonation mode.
Shifting more specifically to your question: Recently, since I had left over sound deadening material from my Scion xB project, I applied some to all the various fiberglass and wood panels on my SAILBOAT that were adjacent to the engine compartment. Previously there was only the foam/metal foil material on the interior engine side of the compartment panels. Since application, the noise and resonating from the engine into the cockpit and cabin interior is now greatly reduced. I applied the deadening material to the outside of the panels and left the original foam sound proofing inside the compartment in place. An alternative for the interior of the engine compartment only is to first apply the sound deadening material and then cover over with the foam/foil. One potential issue is fire resistance. I believe the deadening material would be safe, but you will need to do your own research on that.
Here is a link to a sound deadening material website. Surf around, you probably find a better deal.
http://www.sounddeadener.com/products/bulk packs/fatmat.htm