The only relatively sure way to shut down a diesel is to cut off the air. As has been said, turbo seal failures, shaft failures, running into a pocket of methane or other hydrocarbon gas or anything else that can introduce fuel into the airstream will be used as a fuel source by the engine, so cutting off fuel in these circumstances will not guarantee an engine shutdown.
Large industrial diesel engines generally have spring-loaded butterfly valves in each bank's air manifold that will slam shut in the event of an engine overspeed.
Rusty