Loco stalling on O22 switch:
Is it just one loco stalling on one switch?
Check that the switch has electrical continuity all the way through all the metal rails like it's supposed to have. Perhaps most effectively done with a test light (drawing an amp or more) and track voltage turned up. A voltmeter alone doesn't apply a significant load; an electrical load will help show a high-resistance connection.
Check that the loco has good electrical pickup from all wheels and center-rail rollers. Sometimes weak springs on the center-rail pickups cause elusive intermittent problems.
Some of the larger locos may cause a short circuit from the backs of the wheels touching the center-rail blob as they go through the curved leg of the switch. Look closely. Check that the loco wheels are properly gauged. You can eyeball them against other known-good wheels. Sometimes I have applied small strips of electrical tape at strategic places on the center-rail 'blob' (near the switch frog) to prevent certain locos from short-circuiting.
Older O22 switches have a number of mechanical connections to carry power, which may become unreliable with age. There are other posts with details about overhauling the switches and soldering the internal connections to restore reliability.