There isn't an answer.
However, everyone has the right to have a dog. But that doesn't mean people don't have a responsibility to ensure they have a dog that is appropriate for them and their circumstances.
Ultimately, the responsibility to ensuring that the right people have dogs rests with the individuals themselves (but it's the thicko's that are the problem, because they will get the 'hardest' dog they can and there's no educating someone with the brain the size of a goldfish') and breeders.
However, breeders cannot always accurately judge a person based off their appearance/accent/wealth/house size/job when it comes to selling them a dog. They can do their best. But it doesn't mean they will get it right. You also can't 'profile' who is going to be a responsible dog owner and who isn't. I am sure if that was the case, then I would have been profiled into not being sold a dog. And yet, I have three well-balanced, well trained dogs that are living the best life they could possibly have.
So we are at a stalemate.
You can't educate the thickos.
You cannot profile people and refuse to sell dogs to them just because you don't like how they look/sound/walk/live.
You can't licence dogs because that's not sustainable and is too costly to implement. And no way is anyone going to support the extensive costs associated when that money could go to the NHS...
You can't increase the price of dogs to price people out the market - it just results in backyard breeders
You can't just ban all dogs other than working dogs and assistance dogs because, quite frankly, that's insane and you shouldn't punish the majority just because of a few rotten eggs.
The best anyone can do is react when a new breed emerges that is a clear risk to public safety.