‘Undo’ can be done by shaking your phone
I know that iPhones can alert the user when ambient noise levels exceed safety thresholds, and Apple Watches can detect and alert about detected falls, and even atrial fibrillation. I wouldn't be surprised if phone accelerometer signal processing could predict something like Parkinson's disease.
Unfortunately the best flashlight gesture experience in the business seems to be sold by Motorola. At least last I checked.
My friend liked mine and even found an Android app for trying it on his phone, but basically it was 3x slower than the Moto gestures version despite being on a much faster phone. Not sure why.