My neighborhood is full of these anti-social devices which are entirely designed to try to prevent dogs from shitting on their lawns. The noise they make is always at a pitch I can hear and my dog always ignores them.
My dog has no problem shitting on their lawns, and even sometimes pees on the devices.
So I'd like to find any actual devices which work on dogs (well I have no use for it but just to be sure they actually exist), because circa the original iphone I remember that there were apps which could reliably make its microphones do it (and impact dogs as expected).