The method described is what was used with The Nephew, and it worked well but not so well, he’d stop it for a while but then start again. One day that he was particularly horrid about it, SiL lost her patience and said “you don’t like being hurt, do you?” “nh-hu” “OK, then, I’ll show something to you;” she gave him the softest bit in his forearm “OW!” “it hurts, does it?” “YES!” “so. You don’t like being hurt, Mommy doesn’t like being hurt, Daddy doesn’t like being hurt, your grandmas don’t like bring hurt, nobody likes being hurt! Please do not do things that hurt people.”
It was two separate lessons, in a way: don’t hurt people was one, biting hurts was another. Ever since, if we tell him something hurts he stops it.