My son hits/hurts me when he's angry!!

•K• • Mom to a one son, one 🌈 daughter, and 3 LOVED angel babes. One of the nice girls. Fitness fanatic. All glory and praise to Jesus!🙏🏼🙌🏼❤️
I have a five year old boy (only child). He HITS me or tries to hurt me when he gets frustrated or mad. I've noticed that he doesn't really do that specifically with my husband. 
I'm at a loss for words. My husband and I do argue and it sometimes happens in front of him (it's something we have consistently been getting better at avoiding). We never physically hurt each other. If anything, it's yelling. My husband clearly does have anger management issues and has thrown items or hit a door in front of our child a select few times. 
Does anyone have any advice for how to discipline or speak to our son to curb this? Ive tried many different things. Spanking, pulling the hair at the nape of his neck... I don't agree with spanking because my child laid hands on me -I don't now that it makes sense. I've tried talking to him, yelling at him, putting soap in his mouth, taking away his toys, electronics, TV. Husband has told our son to "never lay hands on his wife again". I've gotten down on his level and sternly told him to "NEVER DO THAT AGAIN TO YOUR MAMA". 
He typically doesn't do this at school or with other adults. 
He's a sweet, pretty innocent little boy with a good heart who loves Jesus, knows parts of the Bible and has been taught right from wrong. 
Does anyone have any suggestions to help change this behavior? Or could share similar experiences with their child/children?