John,
I would agree with your diagnosis. It certainly seems to be the ESA module if the stalling does not happen when you disconnect it. Only other possibility I can think of is a bad gound or shorted wire at the ESA module or the control switches show below.

The grey triangular part at the lower left kicks up or down as you shift into forward or reverse. As it does, it pushes the little switch with the roller arm. That switch intentionally cuts your engine rpm down (and makes it run rough for a second). After the shift cable finishes moving, the grey triangle is supposed to spring back to center, releasing the switch, and the engine returns to normal.
Of course the ESA system should only make the engine slow down/run rough...not make it stall. You could push the little switch with the roller arm manually, to see if that makes your engine quit.
I never had a failure of the ESA module, so I would not hesitate to install a used one instead of a new one (which might be hard to find).
Ray
_________________

"Knot Easy" 2000 Horizon 240 Volvo 5.7GS /SX
tow: 2017 Honda PILOT EXL-AWD
prev. boats:
'87 Chaparral 198CXL 4.3 OMC Cobra
'69 Jetstar 16ft Ski Boat, 115hp Yamaha
'68 Aluminum Jon Boat, 3hp Sears
'64 Water Wings