4 week quandary

In brief:

1997 Subaru Impreza - While driving, car will just lose power and shut down. Car will start up again and go for a while before this occurs again. Happens very intermittently - no set pattern to occurance like going a certain speed, before it warms up, etc. So far have had the alternator replaced as well as the mass air flow sensor. 2 mechanics later (and still at the shop), cannot diagnose. Each time the mechanic(s) have the vehicle, it will not stall for them (of course!). Diagnostics do not indicate an issue.

While driving, car will just lose power and shut down.

Is there any pattern to this? Like after two miles, or after sitting at idle for some time. etc.

No - very intermittent. And has shut down at various speeds - anywhere from being on the highway to trying to park on the street.

I’d look at the fuel filter. If its dirty there will be times when the fuel supply will be too restricted and the engine will stall. After a few moments or a minute or so the fuel will seep through and it will restart. This car is 13 years old and I’ll bet the fuel filters have never been changed.

Subaru’s used to have an unreliable ignition module, a little electronic part that triggered the coil. But chasing these phantoms around in the dark can be VERY frustrating and expensive.