The essence of engineering – solving a difficult problem in the simplest, most efficient, lowest-cost but most reliable way?
The branch line from Weymouth to Portland passed through a deep, vertically-walled cutting near its terminus in the “Tophill” village of Easton. A somewhat similar rockfall warning system was used there, but I am not sure if it was mechanical (putting signals to Danger) or electrical (breaking the circuit so triggering an alarm).