However it takes a little effort. You can actually set up a small area with a little fence around it that your dog goes to when it has to do it's business.
Leaving the rest of your yard and flower beds alone. When you dog is out for a walk and decides to lift it's leg around a street light is marking territory based on what it smells competing with other dogs.
I don't understand why so many rant about something that is so easily dealt with.
You can even teach a dog to use a litter box. You can create and outdoor litter box like a small sand box with a small fence around it.
Then you can actually compost it if done properly so it heats up enough to kill pathogens that are harmful to groundwater.
It takes a few hours to set up everything, some consistency and time to train your dog from puppy stage to know where to do it's business.
Not that hard to do.