I’ve lived near tracks a couple times and the loudest by far is the horn from at-grade crossings. If you are a heavy sleeper and a few blocks away it might not matter, but if you are nearby it is incredibly loud.
Not sure the safety track record, but if it’s favorable, perhaps this kind of program could be expanded.
https://www.sanjoseca.gov/your-government/departments-office...