Of course, some things are out of our control. Management is never 100%. Training is how we reduce the need for Management and how we plan for Management failure. Our dog's genetics, background, health, personality, and stage of development all contribute to their learning.
Some management will always be needed. It's part and parcel of being a dog owner. We can't train a dog to NOT be a dog. Dogs do some things that humans find ICKY! They roll in dead things, They eat cat poop, bunny poop, sometimes their own poop - LOTS OF POOP! They sometimes kill baby bunnies, squirrels, and birds. They bark and growl as part of normal dog communication. Normal dog behavior can't be trained away any more than a dog can be taught to have scales instead of fur or to quack instead of bark.
One of the 5 Freedoms of Animal Welfare is Freedom to Express Normal Behavior.
Certain behaviors in certain breeds are features, not bugs that need to be "fixed". They can be redirected (ie herd balls instead of children) but not eliminated... at least not without causing great psychological harm to the dog. It is unrealistic and unethical to try and train a dog with purpose-bred behaviors to NOT do those behaviors. It's something to consider when choosing a dog. If the thought of being gifted with a dead baby rabbit or bird makes you squeamish, a terrier would not be a good choice. Herding breeds will likely herd the children. Shelties and Pomeranians bark loudly and often. Chihuahuas bark at anyone who comes to your home because they were bred to be watchdogs. People wanted them to bark the alarm that someone was there. Their genetics haven't changed, even if our expectations have.