You could, but it would probably lag out the game a fair bit using this mods approach.
The mod looks for any trains near each player, if it's finds any it then does further checks to see if there is danger. So a few checks per player.
But for bitters and trains you'd have to check for each train if any biters where near. So a few checks for many trains.
I would think looking at how train damage is done on impact would be better.