This starts with personal awareness. The number one thing I teach is actually non-firearms awareness and how to act in public.
You cannot avoid all issues, the lady hit from behind could be an example of "it happens." However, the teacher had both hands full, and he showed no attempt to create or maintain a zone of safety.
My goal in class it to make sure everybody is aware of and attempting to move to unconscious aware - the state of being fully aware and not knowing you are or are doing it. Most people are unconscious unaware - going through life in la la land and don't care; nect they reach conscious unaware - these are the folk who are nervous and jumpy at every sound and movement; conscious aware is a good step but these people are easy to spot as they go through all the obvious moves trying to scan and avoid; finally we reach unconscious aware where people go through life with no obvious way of acting, but they are fully aware of what is happening around them and where everybody is. First steps is to keep your eyes and ears open, eliminate ipads etc, scan with both eyes and ears like we were taught when we learned to drive, and maintain a zone of personal space that nobody intrudes on.
My rule for personal space is minimum of four feet - more than a person can throw a punch at you without crossing. Anytime somebody intrudes in that zone steps are made to move them or me out, and depending on the situation it may include loud verbal commands.
Everybody should view this video and consider how it impacts their life!