When Should A Dog Be Put Down For Being Vicious?

My good friend was out of town over the weekend. She had a dog sitter come by to feed and let the dog out. He apparently didn’t latch the fence gate well enough and the dog got out. The dog ran at a neighbor who was walking her two small cockapoos in the street in front of the house. The neighbor picked up her two dogs to protect them. One of the cockapoos was bitten. The neighbor was scratched. It sounded as though my friend’s dog was pretty aggressive. The dog sitter successfully got the dog back behind the fence after it was all over. My friend’s dog is 7 years old. She’s a golden lab/chow mix. Are there other ways rather than putting the dog down that you would recommend to ensure the neighbor’s safety if the lab/chow were to ever get out again? Electric fence? Muzzle? Socializing training? Other thoughts? Is the lab/chow too old for re-training?