I suspect engine here is simply synecdoche or ellipsis for the entire engine bay or engine compartment— the entire space "under the [AmE hood / BrE bonnet]" where the engine block and its associated components, electrical supply, cooling system, fluid tanks, and so on sit.
Such usage is evident, for example, throughout this 2007 New York Times article about a different unwelcome passenger:
As if New York City car owners don’t already endure enough indignities… it turns out that rats, of which the city has an ample supply, love to cozy up inside car engines this time of year.
While one might imagine a snake finding its way into an intake or a disconnected hose, no one would ever make such a mistake about a rat— least of all a New York City rat— in a nest. The author is clearly talking about the spaces around the engine itself.
The Times is aimed at a general audience, which (particularly in New York City) may not be particularly careful about automotive terminology. Someone who works in the field uses more specific language—
“They like to go into the engine’s compartment to stay warm and they build a nest there,” said Gus Kerkoulas, the owner of Z P Auto on Great Jones Street in Greenwich Village.…
— whereas the author of the article uses engine and engine compartment interchangeably:
One solution, Mr. Kerkoulas said, is two socks filled with moth balls, an old farmer’s trick. Hang them in the engine — away from any moving parts — and that will deter the rats, he declared.
Additionally, I would note that hide is used with prepositions which indicate location, not motion. Thus, your guest cannot hide into, hide towards, or hide back to even the most spacious engine bay, but can slither, scuttle, swarm, etc. into it to hide in or inside or within it.