I don’t think there’s a perfect solution, unless the government clamps down on poor dog owners by imposing instant destruction of the dog, large fines, and prison for dog owners with a dangerous dog that goes on to kill someone. Might act as a deterrent. But then, you’ll get people saying that’s OTT and excuses being made for the dog.
I think some dog owners just have a “shit happens” mindset, they just don’t care. It’s a weird one as the UK is dog friendly to the extent that some owners place their dog as being more important than people eg will be offended if they’re asked to control their dog and won’t care about putting boundaries in place to prevent attacks. Even the way some dogs are trained and brought up, is bound to lead to issues as they are badly socialised, territorial, resource protective etc and will carry these behaviours outside the home.