I am not sure if it is optimal use. Sleep modes are rather intended for low power use.
You could possibly use for instance SW reset with reset escalation what means that after certain amount of resets device stays in permanent reset.
But it is up to you. I would apparently recommend to use security features i..e HSE