P.M.
If the punishment isn't helping, it could be because the boy already feels overwhelmed by his mother's requirements, and more demands and punishment are only adding fuel to the fire. It is entirely possible, though we really can't tell with so little detail, that he's desperately trying to take control of some aspect of his life, and the only thing he can come up with is this sad bid for independence.
There is also a possibility that the boy is "fine" (has no illness, infection, or blockage) but still lacks some maturity in his bladder or nervous system. This does occasionally happen, and is somewhat more likely in boys than in girls. If that were the case, it would be a shame to punish him for something that he can't control. The doctor needs to hear the whole story, and preferably the little boy's side of it too, in order to really determine whether there's a problem on a physical or emotional level.
If the mom is open to trying something different, I hope you can encourage her to read about compassionate parenting, which has worked fabulously well with my daughter years ago, and now with her 4yo son.
There are very few parenting issues that can't be addressed successfully with the help of a book like How to Talk So Kids Will Listen, and Listen So Kids Will Talk. (You can read part of this practical guide to communicating with kids here: http://www.amazon.com/How-Talk-Kids-Will-Listen/dp/038081...) They demonstrate exacltly how to help children communicate, identify their own emotional issues, and participate in finding workable solutions.