How can it be endangerment if what the teacher did didn’t put anyones life at risk? Emotional distress is not endangerment.
You bring aa blank pistol into a bank and attempt to rob it, you will be charged with armed robbery! It’s not the fact it wasn’t a real firearm, it is the fact he wanted everyone there to believe it was.
And if one or more students had killed the idiot teacher they would have to live with that, after finding out later that it was a "joke," for the rest of their lives. Not their fault but you can bet it would haunt them.
Yes, he put people's lives and limbs in danger.