Many problems have early warning signs. Just train the model to notice those signs.
At least in many industrial applications, the vibration of an electric motor or an axle is a good measurement. Also, the temperature of a ball bearing can tell you a lot. That’s just the basics though, because you can also train the model to look at fancier details.