the Japanese have some of the worst environmental incidents but they have mitigated the risks by incorporating technical measures.
Like to prevent derailing during earthquakes, they incorporated a 3rd rail. The wheels cant leave the track and are caught in the 3rd rail during a similar event.
In landslide prone areas and seasons, its common to have nets on the adjoing areas , which prevent ingress of rocks, etc.
Also some railways have a track clearance engine , which inspects the tracks before a passenger train plies.
The Chinese are high iq and should think of solutions or they should consult IR , as we have very treacherous terrain in the konkan railways, northern states and some eastern states.