1999 Jeep Wrangler Sahara Stalling

My Jeep has been stalling out and then eventually restarting (sometimes immediately, sometimes 30+ minutes later). When I try to restart it I can tell it wants to start because it makes the initial sounds but just doesn’t actually catch - if you know what I mean. It kind of “chugs” but won’t turn over. I have had two different mechanics look at it and neither one can get it to stall out, ergo they can’t fix it. It doesn’t come up with any codes when diagnostics are run on it. I have had to be towed twice and had rental cars twice while it was “in the shop”. I really don’t want to take it to the dealer because I know they will just replace a bunch of things rather than the specific thing causing the problem - and charge me a fortune. One possibly important note - I left the gas cap off not once or twice, but three times before this problem started. The check engine light came on but it eventually went off. I started to keep a log of when it stalls, but so far no stalling. I think it may happen when the car has been driven alot and gets hot because I haven’t done it recently - I’m too afraid of stalling out again somewhere. Some suggestions I have found online: CPS, fuel pump, clogged gas cap vent, fuel pump relay, TPS. HELP!!!