Been there done that although mine was not stalling half the time.
My cure was to remove the chassis harness connector from the sensors and apply a liberal volume of contact cleaner.
In the case where the engine has been out, I would also inspect the chassis wire harness for kinks or pinched areas.