My Diesel engine is a Perkins 4.107. Built in 1973. 49 years old. The engine has an electric solenoid fuel shut off. Often known as a "Kill Switch". Hold the switch down.
@xavpil You said "older sailboat engines don’t have an easy and reliable way to be shut down?"
I said My engine is old. I have a "Kill Switch" built into my engine by the manufacturer. Not all engines have this equipment.
The important element is you need to discover your engine shut off. I would look for an engine manual and discover what method
your engine uses to shut down. It is highly likely that the method involves stopping the flow of fuel.