Well said. Basics. It works. Sometimes the attacker is close enough to touch. If they're not close enough to touch, then do what they say and work in psychological angle where you try to make yourself more human to them.
If they see you as a thing and not as a person, then it is easier to hurt or kill you.
When practiced a thousand times and correctly executed, even if they get a round off, it won't hit you. Know your goal; control the firearm or strike it away. If you pop it hard enough with the right leverage, the gun will go flying.
If you miss the grab, then make sure you have pivoted out of the way and have some leverage with their wrist. You can turn the gun on them this way if they haven't let go.
So, stay in control. As stated above, this is a dangerous move if you don't know what you're doing. If you do, then it can save your life.