Peter,
As background my Willard 36 was built in 1967 with a Perkins 4-236. In about 2000 the original engine was replaced with one reputed to have been built in 1998.
I have both a cable operated manual shutdown, and a solenoid valve that is on when the “ignition” is turned on by the key, and a manual lever that shuts the engine down via a cable and pull handle on the dash.
View attachment 101104
In this photo the lever in the foreground is the stop lever, with its operating cable. The lever in the background Is the throttle.
View attachment 101105
This photo shows the electrically operated solenoid valve. It is energized when the key is on, allowing the engine to run. When key off the solenoid de-energizes, and the engine stops.
View attachment 101106
This is a photo from the maintenance manual for the newer engine. It shows only the solenoid valve.
In summary the electrical shutdown is not a mechanical solenoid operating the stop lever, it is a solenoid valve interrupting the fuel flow to the injectors.
Hope this helps.
Bill