It sounds like you are in the city. Or a populated area. The ideas above are good and bad. Gun fire and confrontations will get you in trouble. Do the people make a loop with their dog and circle back?? Usually the same person with dog. This will work by getting the owners attention. But you must be prompt. It has worked for many friends. But will make people cringe.
Wash out an old squeeze ketchup bottle. When you fry up bacon, save the grease in the bottle. They when the dog does its duty, put the bottle in the microwave to get it warm. Careful not to melt the bottle. Then run out and give the bottle a small squirt over the offending item. When the owner/dog does its return trip, the dog will slurp up a tasty treat. It should work the first time the owner sees what the dog did. Either way the offense is gone.
Wash out an old squeeze ketchup bottle. When you fry up bacon, save the grease in the bottle. They when the dog does its duty, put the bottle in the microwave to get it warm. Careful not to melt the bottle. Then run out and give the bottle a small squirt over the offending item. When the owner/dog does its return trip, the dog will slurp up a tasty treat. It should work the first time the owner sees what the dog did. Either way the offense is gone.