I'm afraid that would be too difficult to enforce. Look, the obvious answer here is simply to ban ownership of dogs. That would solve everything.
I like the way you think.