I second the suggestion from Saildude in reply #1.
Had a pump station with 2 - 415v 400hp vertical motors on level 5 of a pump well in a flood zone feeding a line shaft on each down to ground floor pumps.
So many bearing blocks on the way down and all monitored by temperature.
Prior to the sensors, one line shaft let go due to a failed bearing and near tore the internal structure apart as the motor kept running.
After the event and the temp sensors which shut down the motor, not alarms as it is an unattended station, everything has been fine for the last 20 years.
An occasional shut down now and then from a failed bearing.
Oh, and no Arduino, just the temperature sensor relay, a matter of safety.
In these conditions one should never rely on electronic programs and such.
As a maintenance lecky, I'm surprised you do not know this.