I'd have drained the bathwater after a single warning.
If he kicked or hit me I'd have got down to his level and said very firmly: 'We do NOT hit people in this family. Hitting hurts a lot and makes people sad and angry. Would you like it if I hit you?'
I might try a tactic like shoving a large soft toy between him and me and saying, 'Cuddle teddy until you calm down because it is NEVER okay to hit people. You need to cuddle, not kick.'
If he carried on messing around, I'd say, 'I do NOT spend time with people who hit me, ever. So I am going somewhere nice and cosy away from you. When you are ready to be kind and friendly, come and say sorry and then we can have story time' Then I would have walked into another room and ignored him completely until he apologised and meant it.
If he tried to bypass the apology, I'd just repeat: 'I never spend time with people who hurt me. Say sorry and mean it or go away until you are ready to say sorry and mean it.'
When he apologised, I'd ask: 'Why did you think it was okay to kick and hurt mummy?' and I'd expect an answer.
It's a tough question but you can ask it of a 5 year old. Boys are never too young to learn it's not okay to use violence.
Then I'd ask, 'If you feel like that again, what could you do instead of kicking? What would make you feel better?' I'd listen to his answers and come up with some ideas with him, like cuddling a very big teddy bear until he felt calm again.
People think gentle parenting is soft and avoidant. But it's actually bloody time consuming. However, if you can be arsed to do it properly, children grow up with a strong sense of fairness and kindness and thought towards others as well as strong boundaries and solid self-esteem.