As someone who has a higher sex drive than my partner, it can be difficult. How do you express your need for physical affection without being "coercive"?
Everyone has a different love language. For some people sex is a key way they feel loved. It doesn't mean it's wrong to not have sex, but it's also valid if not having sex makes you feel unloved.
I definitely think your husband should have questioned how his own behaviour would mean you don't want to have sex as much - the fact sex was painful to you, and he didn't care about foreplay or emotional intimacy - if he didn't care about that then he was definitely just being selfish.