They don’t need to even do that, just occasionally send the train past a thermal camera and look for wheels that are warmer than average.
Here's an example of one working: https://www.youtube.com/watch?v=R7BGg82uQ1U
I'm not sure whether similar equipment was a factor in the East Palestine incident.