In the 1970’s and 1980’s there were several books the either had characters that did it or promoted it.
Why is there no cooking tray in my new car’s engine bay?
Is it dangerous? (It would be less physically dangerous if there was a specific spot for it.)
My wife’s family once baked potatoes in the engine compartment during a road trip, just to see if it would work. Enough fumes leaked out of the engine that everything tasted slightly of oil and exhaust. Car engines are much tighter now, but I’m sure you still get a similar effect.
It does seem a better seal than “pinched aluminum foil” would be needed.