Dies While Driving But Starts After Venting Gas Cap

After driving a bit the car dies. It won’t start right away but when I open the gas cap it vents a bunch of fumes. It will run with the gas cap off which makes me think the cap stopped venting for some reason? No codes indicating any issues. Never had a gas cap stop venting before; could that be the issue?
1999 Mountaineer V6

Gas caps have not been allowed to vent to the outside air in years. That is what the whole Charcoal canister, purge valve system is about. Cars do have a vent for the gas tank that is supposed to vent if the system is plugged . Sounds like yours isn’t working

Do you have a Check Engine Light on?
Can you post the codes here?

Your gas tank breaths in trough through the charcoal bed as the fuel is pumped out. You have a line that runs through the activated charcoal and to a small orifice next to your gas fill hole that allows the tank to breath out without venting gas fumes to the atmosphere (the charcoal captures the hydrocarbon molecules) and to breath in as gas is pumped out as well. The fumes captured by the charcoal bed are then drawn into your engine as it runs through a solenoid-operated “purge valve”.

If your charcoal bed becomes saturated with liquid fuel, it can prevent the gas tank from breathing in and allow a vacuum to develop in the tank’s air space that can cause the pump to be unable to maintain adequate pressure in the fuel line to the engine. The two primary causes of this are (1) “topping off” the gas tank after the handle shuts off, and (2) malfunction of the “purge valve” or its solenoid, preventing the engine from evacuating the charcoal bed as the engine runs.

The solution is to either change the charcoal canister or the purge valve/solenoid assembly. Sometimes cleaning of the orifice in the throttle body through which the gas fumes are drawn from the charcoal canister might work, but I wouldn’t get optimistic about that one.

You may need to change some parts. If you “top off” your tank, I recommend discontinuing this practice. But you may need to change some parts anyway.

No codes or engine light on. After filling up, we were 70 miles into the trip climbing up a mountain road. First few times pulled the cap, let it vent, then drove for a bit until it died. The last time just left the cap off and it drove the remaining 20 miles with no issues.

The only other possibility I can think of is that the pump is getting weak. Perhaps too weak to overcome even the slightest vacuum. It is, after all, 18 years old.

Could this be as simple as a weak fuel pump, mountain incline and low fuel level ? Apparently the problem first happened going up hill. If it does not happen going down or on level surface it is clue time.

Get a new gas cap.