If you live in the country, can deal with a barking dog, and want chicken and garden protection as opposed to a pet, then from what I've heard a Great Pyrenees or other LGD would likely work for you. But not just any purebred, you want one from proven working lines and not show dogs. You need to socialize them carefully because they can be very protective - you want to be sure they don't attack your guests, mailman, etc.
If you want a pet that also offers some protection, then I agree it is more about training than breed. However I feel that certain breeds are easier to train than others, and that herding / working breeds are best for this task. Terriers and hounds for example are difficult to train. Herding dogs can be obsessive and can get easily bored / destroy your house f they have nothing to do. I have an Australian Cattle dog x Australian Shepherd who is a pet, but she has been an excellent guard dog, and has never been bored enough to cause problems. If she hears anything at night she lets us know, usually it is a raccoon and she chases them away - even knows not to get too close. She has also killed many rats, which is a huge benefit for us. Despite her prey drive, she was incredibly easy to train to be good with the chickies, I can even leave her alone with them and have been doing so for ~12 years. The key to success is basic obedience training - a lot of it, this is how you learn to communicate with the dog.
If you want a pet that also offers some protection, then I agree it is more about training than breed. However I feel that certain breeds are easier to train than others, and that herding / working breeds are best for this task. Terriers and hounds for example are difficult to train. Herding dogs can be obsessive and can get easily bored / destroy your house f they have nothing to do. I have an Australian Cattle dog x Australian Shepherd who is a pet, but she has been an excellent guard dog, and has never been bored enough to cause problems. If she hears anything at night she lets us know, usually it is a raccoon and she chases them away - even knows not to get too close. She has also killed many rats, which is a huge benefit for us. Despite her prey drive, she was incredibly easy to train to be good with the chickies, I can even leave her alone with them and have been doing so for ~12 years. The key to success is basic obedience training - a lot of it, this is how you learn to communicate with the dog.