The evil of global mutable state strikes again.
This is why I only train my dogs in a pure functional language.
"Reduce!" ("Reduzier!")
"Map!" ("Bild ab!")
I don't think you can entirely remove the side effect of getting treats.
It's merely the software architectural mistake of only constructing a broadcast channel.
Security by obscurity is fundamentally weak, this use wastes bandwidth, and can be destroyed by statistical analysis where the other dogs learn German.
Just don't be confused if they then follow the commands side-effect free.