It sounds like your car is starved for fuel. Why is the mystery.
Stopping the car for gas is the only time you turn the engine off for 2 minutes. Other stops are probably longer (restroom, food, etc). You said you tried just taking off and replacing the gas cap. Did you do this test under the same conditions as when you experienced the problem (long hot drive)? What happens if you only fill up the tank half way? What happens if you leave the gas cap off after the fill up?
When you suck gas out of the tank for the engine, something has to replace it, and that something used to be air, leaking in through vent holes. But now, gas tanks are sealed systems to reduce pollution and the air comes from the engine by via of vacuum lines and canisters that trap vapors to be burned in the engine rather than released into the atmosphere.
I would guess that you either have a weak fuel pump, or a problem in the gas tank ventilation system. But a ventilation problem would probably set the check engine light, so I'm puzzled.
You could also have vapor lock (gas in the fuel system gets hot and goes to vapor, which prevents liquid gas from getting from the tank to the injectors). This could also be related to low fuel pressure, or a bad check valve, or to worn out rubber in the fuel lines under the hood.
Next time you fill up, try driving off without the gas cap. That will set the check engine light, but it would allow you to determine whether your car is starved for gas due to a gas tank ventilation problem. (After you replace the gas cap and run the car through a few start/stop cycles, the check engine light will go off when the computer no longer detects the problem.)