The throttle position sensor is the last thing to suspect. Of all the sensors, it has the least say in fuel metering calculations, and it won't cause stalling.
A better suspect is the ignition switch, just based on your dandy observations. I'd start by having the diagnostic fault codes read and recorded. The people at many auto parts stores will do that for you for free. If there are no codes, the next thing would be to drive the car with a scanner connected so you can view live data when the problem occurs. That will let you see if the ignition switch turned power off, as in from an arced contact or overheated terminal, or if something else quit or changed.
SPONSORED LINKS
Saturday, March 21st, 2015 AT 10:14 PM