Hey akajuwan.
A failure with the Crankshaft Position Sensor, the Ignition Control Module, and/or the Throttle Position Sensor could cause intermittent stalling. That said, it’s important to check the wires and connectors (pins) associated with these aspects, as corrosion or physical damage, etc., to the wires or connectors could actually be the problem, and not the actual sensor or module.
Might be able to provide more helpful info if you would provide the details on your model.