For corporal punishment to be effective, the recipient must understand right from wrong. Otherwise, they will not be able to make the connection between their actions and the consequence.
The benefits of corporal punishment are lost when it is administered to those that cannot fully grasp the idea of right and wrong. For it to have any impact, the child or adult must have known that their action was wrong and done it anyway. Unless this criterion is met, it should not be used. In the past, corporal punishment has been deployed against children with mental disabilities and behavioural disorders. In these cases, it has no effect beyond making their lives unbearable. They will not modify their behaviour and corporal punishment becomes cruel and unethical.
[P1] To change someone's behaviour they must know the difference between the right and wrong behaviour. [P2] If they don't it cannot be changed. [P3] The purpose of corporal punishment is to change behaviour patterns. [P4] Therefore, corporal punishment can only be effective on those that already know right from wrong.