OP, you write that your daughter only hugs on her terms?
Whose terms should she hug on?
Her fathers?
Of course she should only hug when and who she wants.
This is really basic.
Your husband is an issue here.
Speak to your GP and ask for advice.
If he doesn't grow the hell up and start behaving like an emotionally intelligent adult who respects his child, you are likely in for an escalation of issues with your child.
Start doing research on sensitive children and how to help them.
I would think from the way your husband behaves, she feels unsafe emotionally with him.
His juvenile petulance has registered with her and she is rightly wary of him.
She is a child, he is the adult, but from your description of how he behaves, you'd never know it.
Start focusing on the damage HIS behaviour is doing to your child.