I think consequences are needed if you've tried social stories etc, are sure they understand what they are doing is wrong, but choose to do it anyway.
My ds is fully aware of the house rules, but will choose not to obey them if they don't fit his own agenda. He understands that if he makes a wrong choice and breaks one of the rules that are set in stone, then there will be a certain consequence.
We ask him to stop, ask him to remind us of the rule and/or remind him if he's being evasive, if he does it again he gets a warning that the specified consequence will be the outcome of his actions and then if he still chooses to break the rule we put the consequence in place.
Obviously, smacking as a consequence would be completely wrong, as would putting in place a consequence without him being aware of a) what he was doing wrong and b) what the consequences of breaking that rule would be.
If he's going to live within our society, he needs to learn that certain consequences are not only unacceptable, but also incur consequences. If when he's older he decides to punch someone who he perceives is winding him up (like he did at school this week) he needs to understand that he will most likely be arrested for it.
In the case of my ds, he always needs an explanation of the reason to do or not to do something and we always take time to explain things. However, he often sometimes doesn't agree with our reasons and will carry on doing something he is not allowed to do regardless. I promised myself I would never say the immortal phrase my mother used to use "because I told you to", but when you have been challenged for the 50th time that morning - eventually your patience wears a bit thin.
In the OP's situation, I could tell him till I'm blue in the face that hitting is wrong and he musn't do it, but that wouldn't stop him doing it if he felt justified in hitting.