Yes, I essentially agree with that.
But I really do feel that require all dogs to be on a lead in public would solve 90% of the problem.
Like you, whilst out I have had to contend with other people's animals on numerous occasions. Only a weekly basis. Most if the time it's barking, quite often it's jumping around me and barking. Sometimes jumping up me and barking. On a couple of occasions being bitten (Never broke the skin). And on ALL occasions the owner has been a 'respectable person. Interpret that how you like, but I am referring to someone well dressed (for the location) and well spoken. NOT a Grant Mitchell clone.
This suggests it occurs across all social groups. So by requiring a dog to be on a lead it will stop the 'well meaning' (again, who in my experience have always been the owners) as well as the not so well meaning (who, as someone will suggest, will always flout the law).
When I am out, minding my own business, it is not my responsibility to know how to act around a dog. It is the owners responsibility to ensure the dog knows how to act in public.
I truly think a law requiring dogs to be on a lead in public solves the lions share of the problem. The problem is across all social classes, not just the ill intentioned, so claiming 'there will always be law breakers' is no excuse to do nothing and letting all those guilty to get away with it.
If all those 'decent' people I've encountered had their dog on a lead I would never have had problems. A law would be about them taking responsibility as much as those who don't give a damn.