I know this sound crass but it is worth working really hard to prevent this (obviously Mutty!).
Look at approaching dogs body language
I never ever approach or pass dogs that are giving off stress signals.
I do not ever let my dogs interact with dogs or owners I do not know - I have a large circle of dog friends so this is no hardship.
I never ever walk in "popular" dog walking areas
If a dog charged up to my dogs I would immediately stop the approaching dogs with voice and my body language - however I have experience of doing this
If we were attacked by surprise by a dog I would be doing all I can to get them off my dogs.
Dont scream that will only excite the dog more.
A low loud gruff voice may help.
Depends where you are but a loud noise can interrupt so if near the car get someone to sound a car horn or bang metal - (Not that you have that on a walk or in the park)
If you have a water bottle you can empty that over the dog and they in the split second they pause separate but again really hard to do.
A barrier between the dogs may sidetrack the dog so a large branch if available.
You can lift the back legs but really hard to do and a terrier or bull breed will probably still have hold of the dog and you can just aggravate the injury.
Poor poor owners of the terrier how traumatic and horrific for them and you Marco to have to see.
I know I am talking to the converted but please train your dogs and keep them safe.