For what it’s worth, he says there’s a little white lie in the video, no strangers were ever involved. Everyone it sprayed was a friend of his “testing” it out. There would be too much liability involved if his automation caused someone to run into the road and get hit by a car or something, so he didn’t actually leave it on for 2 days straight to spray random strangers. He just did it for fun.
Also, he installed custom firmware, probably the RTSP firmware, or Dafang, then ran it through the Raspberry Pi to do the person detection.
A person could do this same thing with Home Assistant API, then have a motion sensor or a Camera with a detection zone basically do the same thing.