There is technology that could detect rail breaks, in the form of track circuits: feed a current into a rail, detect whether it gets to the other end (or bridge the two rails at the other end of the circuit and see if it gets back to the start of the other rail). A variation of this is commonly used in signalling systems to verify that the track is clear: if a pair of wheels is in the track section then the signal will short across the rails and make the circuit show 'occupied'.
Ultimately, though, this kind of stuff is expensive (semi-bespoke safety-critical equipment every few miles across an enormous network) and doesn't reduce all risks. Landslides don't necessarily break rails (but can cause derailments), embankments and bridges can get washed out but the track remains hanging, and lots of other failure modes.
There are definitely also systems to confirm that the power lines aren't down, but unfortunately the wires can stay up and the track be damaged or vice versa, so proving one doesn't prove the other. CCTV is probably a better bet, but that's still a truly enormous number of cameras, plus running power supplies all along the railway and ensuring a data link, plus monitoring.