The biggest danger with washaways is that they may be difficult to spot in time to stop short of the point where one falls over the edge and/or into the water where one may drown.
A quicker method is to replace the washed out earth with a criss-cross structure of timber steepers called a pigsty which is only slightly wider than the track itself.
[3] A mechanical railway signal that is normally "green" can be put to "red" if a link in the pulling wire is disengaged by a slump of the earth beneath.
An electrical railway signal that is normally green can be put to red if a contact is opened circuited by a slump of the earth beneath.
A similar setup might be used to protect bridges likely to be hit by ship collisions, as with the 1993 Big Bayou Canot train wreck.