Been having the same issue with my 1988 325is having intermittent stalls. Replaced all the relays, including the OBC relay, ignition coil, fuel filter, ignition switch, CPS, TPS, fuel purge valve and AFM (refurbished by Bavarian Restoration); repaired C191 connector - wires were corroded through. All of the electrical/mechanical parts were original with over 295k miles on it so thought one of them had to be the gremlin.
Been having this problem for the past 3-4 years and it was progressively getting worse over time. It started with only in very hot weather (over 102) to just recently every 20 minutes or so.
Car still stalled and finally decided to have an experienced BMW tech takeover. I was worried it would stall on the bridge or highway without a shoulder or pullout so had it towed to my talented BMW mechanic. Good thing I have a 200 mile tow plan on my AAA card since he is located 120 miles from home.
He found it being the wiring in the harness. His plan is to try repairing it, but may need it replace it; he indicated it is where the wires are shielded from interference.
I recommend doing the cheap and easy fixes first; the fuel and main relays, and checking the C191 connectors for corrosion.