With a properly tuned igniton system and clean carburetor the OMC ESA system should not stall the engine. Normally these engines came with a Prestolite points distributor and a Rochester 2bbl or 4bbl carb. Both require maintenance for the engine to run correctly and not stall. The points and condenser at least in my experience seem to need to be changed every 4-5 seasons, the cap and rotor maybe every other depending on your climate (internal corrosion of contacts), spark plugs also should be changed every few seasons. The carb in my experience seems to need to be rebuilt (cleaned and put back together with new gaskets and accelerator pump) every 5-6 seasons.
The way the ESA (electronic shift assist) system works:
The Cobra outdrive like a Merc Alpha is a dog clutch system. These will want to stay in gear when you try to shift to neutral. In order for it to shift to neutral the engine RPM has to be lowered from about 600 to 450 or so. So when you shift, the cable jacket flexes and this triggers the shift linkage to engage the interrupt swtich on the shift linkage plate on the engine. This will drop rpms to 450, the drive will drop into neutral, the cable jacket relaxes and releases the linkage and then the interupt swith dis-engages, idle rpm returns to 600. The problems you can have:
sticky shift cable, may keep that interrupt switch engaged too long
crudded up bell crank in the pivot housing of the transom mount assembly, they can get water deposit in the recess where the bell crank is and this can mimic a bad shift cable. I clean this out and pack it with OMC triple guard grease.
The microswitches can wear and stick ON...
the first run of OMC Cobras there were 2 switches, the interrupt and the over stroke, which was supposed to keep the interrupt from engaging when the drive is in gear. Later on I think around 1990 or so they changed the system to one that used only the interrupt switch and the ESA module was changed to use a timer to limit the amount of time the ESA would lower the idle
The ESAs can also fail, I wound up replacing the switches and the module on mine in 2015, they work perfect with a properly adjusted shift cable, the drive shifts with 2 fingers.
so you need a properly tuned engine, clean carb, properly adjusted shift cable and funtioning ESA system.
To do the shift cable adjustement you need the factory manual (updated instructions are available on the midnight wolf OMC site) and the tools to set up the cable. The first time you do it, the job can take a few hrs but once you get it right it will shift great. I set mine up in 2013 and have not had to touch it since then. You should also measure shift cable drag and if its more than 2.5 lbs you need a new cable.
Here's a pic of what the system looks like with the early version, 2 switches: