Back in the day I used to heat (or re-heat) frozen food, usually wrapped in foil, hung on a piece of hanger wire, on the engine usually near the turbo, back when I was driving truck...this was in the days before we had a microwave oven in the sleeper.
Road food...burritos, frozen chicken, 'TV dinners'...crap you could buy at the truck stop or the nearest convenience store....
As far as actual 'cooking'...nope...our engines generally did not get hot enough to 'cook' unless it was in the middle of summer in the southwest (and cabover engines are a hard to access unless you tilt the cab!)....now days, even with conventional hoods, under-hood temps are a bit higher (tighter emission controls) and it might be possible to actually cook on a large class 8 diesel engine. Turbo and exhaust temps can be pretty high but usually only during heavy work loads such as climbing a long grade, so usually a fairly short interval and trying to get even cooking near the turbo with all the sensors, wires, tubing, etc...it's just not made for that.
When cheap inverters and cheap microwave ovens and other cheap and small electric cooking appliances came along, "turbo rotisserie chicken" became a thing of the past, at least for most of us...