In case anyone is interested:
this article has a very good summary of the scientific research that proves that punishing a dog
after they did something wrong is useless. In the experiment the time between transgression and punishment was only 15 seconds and still the dogs of the "delayed punishment" group ignored the taboo when the experimenter wasn't in the room.