Why doesn't my car restart after I turn it off?

I drive a 1996 Honda Prelude Si 2.3L. When I drive my car over 30 miles or more and park. When I try to restart the car it starts up and dies immediately. I usually have to leave it alone for about an hour or so and then it starts up again. Took it to 3 mechanics. 1st mechanic diagnosed it as a bad ECM. 2nd said it might be the ignition switch. 3rd said it was the distributor. I properly installed a rebuilt distributor from Auto Zone and the car still dies after driving for a while. If its not the distributor then what else could it be? In order of most likely to least likely

It is a sensor.
Take it to a dealer or a proper mechanic with dealer level computer systems.

Main relay.

Replace the main relay. No joy, check for power and ground at the fuel pump when starting with no-start.

When's the last time you did any maintenance to the motor?
Spark plugs every 60,000 miles
Valve adjustment every 60,000 miles.
Have you had a mechanic read the engine data with a scan tool to see if all the sensors are working with in spec?
If you always top up the gas tank it's likely the carbon canister is full of gasoline and the motor is getting flooded on hot restarts. Hold the gas pedal all the way down to the floor while trying to start the motor

Web search "Honda main relay" to find out where it is and resolder it.

Fuel pump. Otherwise, the catalytic converter is nearly clogged and putting too much back pressure on the engine. You can pull the O2 sensor to allow some gasses to escape through the hole then drive it to see what occurs. Make sure those gasses don't blow on anything flammable under the hood. Short drive.