Related: what’s the verdict on cat scruffing? Does it work? Should you do it to adult cats?
I used this to train a cat not to walk on my desk. Kept a teatowel and would do this every time for for a bit when ever it walked across my keyboard/papers while I was working.
Not sure if was ethical... Cat didnt seem in any discomfort, just annoyed it was stuck there. Was a while ago so not sure but seemed to train it ~5 times.