----------------
For the accumulator is it located under the hood on the passenger side of the vehicle more towards the passenger compartment. As for the problem itself, this is typically of a crank sensor that is failing. It is always easier on vehicles with just one crank sensor. As for the PCM, it is true that if you lightly tap on it and the idle changes that this typically means the PCM is failing internally.
-----------
-----------
But if crank sensor checked ok and AC accumulator is also fine, then get the computer replaced.------ Its loosing its signal from any of the sensors and the flow of fuel stops.
other possibility is faulty o2 sensor and crank sensor. The o2 sensors are before and after catalytic converter.-------Both the sensors are to be replaced.------ And as per you mentioned your problem, its quite possible that faulty o2 sensor will cause this problem.------ O2 sensor is the part which sends signal to ECM( the cars computer).It sends signal to computer about fuel / air mixture.How and when to send fuel to engine.--------- If o2 sends stops sending signal to cars computer then it will not send the fuel to engine.------- In your case the o2 sensor is getting overheated and this is stopping the o2 sensor from sending signal to ECM.But when your car shuts off the sensor gets cool and again it starts working.------ So as per problem, get both the o2 sensors checked and replaced.---------- Also get the crank sensor checked.------------- For stalling problem if noticed get the fuel filter cleaned, get the throttle body and IAC valve cleaned.------ The idle air control valve is also located at throttle body.Clean both throttle body and IAC valve with throttle cleaner.