I was regaled in my youth with the story of a neighbor, our doctor actually, who heard the dog whimpering and found his toddler son with his hand down the dog's throat. A collie.
That’s the one way I have heard to flummox a dog bent on biting. Shove fist down its throat. Takes some faith to believe that yes, the gag or gasp reflex will supersede the bite one.