well first obviously I'd try to persuade her of the ridiculousness in teaching a child not to do something that's wrong by, er, doing the very thing they are not supposed to be doing,
But if that doesn't work, how about asking her if she really wants to be the only person in her grandchild's life who goes around intentionally hurting him? He's really going to want to visit her when she's old and incontinent, isn't he? Kids have amazingly long memories.
I can still remember my granny babysitting me when I was about 3 or 4 and shouting at me because I came downstairs after lights out. I'd had a bad dream and had come downstairs for comfort which my parents allowed - but she yelled at me so instead I crept back to bed and cried myself to sleep. 27 years on, and I can still remember the confusion and injustice of it - even though I loved my granny very much and she's now dead.
Your DS won't forget that his granny is the mean old woman who went around hurting him when he was too small to defend himself.