1998 Jeep Cherokee mystery stalling

I have a 1998 Grand Jeep Cherokee Laredo that has been in and out of the shop for the couple months. Initially the car stalled during drive (could start up soon after and run for few minutes then stall and repeat until we got to auto shop),the map sensor code appeared and so we replaced. Then a week or so later the car again would not start after being driven about 15 miles (sat couple of hours). It would turn over but stall out in about a minute. Again the map sensor code appeared and the mechanic suspected possible computer issues. We replaced the computer and within the day the car stalled out during drive. It would restart and stall out every couple of minutes. Mechanic found that wiring to map sensor was damaged so it was replaced. Within a week of getting the car back it would not start after being driven for about 10 minutes(then sat 30 minutes). We again towed to mechanic and they could not find what is causing problem. Mechanic has kept the car for past week driving each day and has not stalled again. However, whatever has been causing the stalling has still not been determined. Our mechanic is at a loss, any helpful ideas out there?

Has the IAC valve been checked out?

There MAY be an intermittent power loss in the ignition system.

I don’t need to remind anyone about the headaches that associate themselves with this problem.

I’m suspecting a poor ground or other contact fault here.

I guess it MAY be an idea to plug in a code reader and hope a code pops up the next time the engine dies.