I also agree with @Highlyflavouredgravy yep it’s not ideal at all but to break up a family unit? Which generally means massive upheaval, less support for each parent and makes it harder to parent a child who is obviously struggling.
However, even children of 12 know what buttons to press and your DH and your DS have both behaved appallingly. I feel strongly that your DH needs to own his ( I am presuming heat of the moment, inappropriate) action of hitting DS but DS will have to be supported to own his poor behaviour. It would be a good idea to ask for support from a counselling service and if possible engage counselling for your DS on his own.
A serious discussion needs to happen around rules and boundaries for DS and a safety plan for DH re walking away if confrontations happen again ( which they will). I’d also be looking at the whole dynamic for DS who is he friends with, how does he interact in the home, what’s happening at school etc?
For those suggesting LTB, far easier said than done and what would it really achieve? Momentary satisfaction from a grumpy preteen who sees his Mother backing him and ‘ punishing’ his Dad? If violence was a regular occurrence then yes, but even parents are allowed and do ( and yep it’s not great) to make a huge mistakes and learn from it. With careful handling OP, which should not be solely your responsibility, and professional help I think and know families can recover.
I live in a country where smacking of minors is illegal, we also have one of the highest rates of incest, child cruelty and poverty in the developed world.