I haven't been on the forum much since Tuesday. My past 72 hours hasn't been exactly ideal, and depending on quotes today I may spend the rest of my vacation working on my X in my driveway.
y e a a a a
So about your situation . . . I just re read this thread. From a top down view, you have an issue that is not intermittent. If you start your rig, IT WILL DIE. That variable is - how long will it take to fail and leave you stranded? What you have is UNDERTERMINED in that no one knows what the root cause is, just the symptoms.
We spoke of doing some diagnostics. The shops have tried to read codes but were unsuccessful. You have tried a few inspections and replacements and are unsuccessful.
The depth of the diagnostics on both cases are not extremely deep and doing more requires a strategy for debugging that involves expensive equipment and technical expertise. This will cost you.
The thing you do have control over is testing and replacing parts that might be the cause, and you have covered most relays and fuses. Have you sufficiently touched and tested all of them? Dunno. You swapped the PCM and main relays afaik.
There's still a zillion things I could mention, but they are more fringe things.
1) your battery connections
2) the fuses and fuse holders connected to the positive if there are any
3) alternator diode short
4) mass airflow sensor connection
5) engine relay\relays that provide pwr to the ignition coils.
And we could keep nickle and diming this forever until you replaced everything.
There are some major consideration such as the fact that in order to run at all, you MUST have gas, air and electricity. To the extent that any of those are not available or managed a vehicle will not run. If the gas pump stops, no go. If the mass airflow sensor is kaput, no go. If the 12v to the coils is not available, no go.
When the X dies, and you try to turn it over, you can make observations. Do you actually have spark? If you remove one of the coil plugs and can see\hear tack tack tack then you have spark. If you are pumping un-burned gasoline out of the exhaust pipe then you have gas.
We could say, based on observation that your rig will start from a cold engine. Once it has warmed it dies. This could be electrical or mechanical or both.
A $4 volt meter will tell you what you need to know. Buy some at Harbor Freight and keep them around, for $4 you don't have to care if the dog ate it or you ran over it.
The cables only plug in to 2 places, and you want to be sure and plug the RED in to the spot that says VOLTAGE or has a V symbol. Do not plug it in to the CURRENT location with a A or VA letters.
Set the dial to the 20V range and test a AA battery. If it reads appr 1.25 volts, you have the right settings. Now touch the leads to the car battery, it will read appr 12v when not running. If you do this and nothing sparks melts or smokes, you're good, leave the meter on that setting.
This will allow you to test if you get voltage to the fuel pump, to the coil packs, to relays etc.
Beyond what I've added to this post, unless I have some epiphany, I just have nothing else to add. I think the best you can hope for is to find someone else on the internet that has your same symptoms and discover how they fixed it.
An illustration: I was driving down the interstate and I head some god-aweful sounds so I pulled over and start inspecting. I removed the 2" receiver licence plate holder and drove again, this wasn't the source of the noise. I stopped again and put that back on, poked around some more. AHA! I find something I had not seen since I bought the vehicle. There is a support arm for the air intake tube and it rests on the bolt that had no nut. This would let the support arm bounce up and down as the air moved through the vehicle at higher rates of speed. This must be the noise, so I grabbed some big wire-ties from the cab and secured the support arm in place. This turned out to not be the hellacious noise and not the permanent fix for the support arm.
I get out in the rough country and my vehicle stalls, over and over again. Your situation came to mind. I opened the hood and started to physically inspect everything and found that the whole breather assembly was loose. It didn't look loose, but when I wiggled it man was it not connected at the throttle area. No nut on the support arm and all that shaking from the logging roads made the connection come loose.
I got the big tool kit out and removed the plastic cover, seated the tube and tightened the metal bands. I then used about 2 dozen wire ties to prevent the air intake and support arm from moving in any direction. This was a 20 minute investigation and fix and I was back in business.
Today I'll replace the missing nut and lock washer. The point is, that you can have a lot of grief over something as simple as a missing nut; that the problem may be systemic as one thing causes another thing to not work properly; that the way to find the problem is to inspect and test one thing or system at a time methodically.
I feel your pain and frustration and hope you will eventually resolve the issue. I'll continue to reply, albeit I'm starting to officially claim "out of ideas".
.