If the screen is off (i.e. in standby), the hardware will not register any touch events so what you have asked for (detecting screen gestures) is not possible. When the device goes to standby/asleep, the touch screen is effectively shutdown to conserve battery power. The best you can do is detect an action that does wake the screen, e.g. one of the hardware buttons.
Also, if you wanted to detect touch events for your app, the device would need to be on with your activity in the foreground. So again, screen gestures are a non-starter for an SOS type app.