Here's how vaporlock occurs- when you shut a hot engine off on a hot day, the heat sticks around for a good long time. There's fuel left in your fuel rail and if it gets hot enough, it boils- and turns into a gas (not gasoline). Gasoline boils at a much lower temp than water- depending on the additive package it has in it. Summer fuels have particular additives that prevent this and winter fuels do not. Additives can be more expensive than the gasoline base stocks and there's no sense adding more than you need If it cools enough to condense back into liquid, your engine will typically restart. With modern high-pressure fuel systems, it's an unusual occurence. But it does happen. It's fairly common when you get those 80 degree days in April, before the summer gas hits the station tanks.
That sounds like heat soak on an electrical component is also a possibility. Another not-unusual occurrence. Heat can cause circuit component to expand and lose contact. When it cools and contracts, the circuit is closed. You can test by isolating particular components and either douse them with cold water or spray them with freeze spray.