In a Reddit thread about dogs pooping in their neighbor's yards, somebody brought up the solution of using a motion activated sprinkler to deter dogs from using their yard as a toilet.
This is a humane way to deal with dogs that try to make your yard their toilet. Or it can be used to repel other animal pests.
I think this looks like a good idea if you have unresponsible pet owners in your neighborhood and you want to stop dogs from pooping on your long, without harming the dog.
Maybe something like this motion activated sprinkler could spray the irresponsible dog owner too!