I suggest that you check the connection between the ignition and the main harness ,this is a white two cable connector beneath the steering wheel
they are made of a material that is liable to corrode over time.I had very similar problems to yours and investigated by two very competent auto electricians
with no success and finally found after car stopped abruptly at midnight in the country -it was then easy to see the flashing of the bad connection and ten minutes
to put a basic connector in.
good luck