Whump DOES have a relationship to pain kink, but it is (as stated above) about pain in fictional characters and stories, and it's not usually, or at least not always, sexual.
Or, I would say it's much broader than being sexual. I struggle to make generalizations about it. People tend to want to whump characters they find attractive, and whump is about the character's body. Obviously bodies can be sexual and are deeply related to sexuality, but it isn't just about the sexuality of the body, it's about the body's vulnerability, the body's need for care, the body's experience of pain, the body's psychological and emotional meanings.
Where whump has a relationship with pain kink, it is just as closely related to masochism as it is sadism.
Whump is not a sexual thing for me, but I've always been interested in whump and I've always been a masochist, and it just...doesn't make sense to me that these things would be totally unrelated. Like, come on now.
I think for most people, whump is about catharsis in some way. For me personally, the appeal is about taking a character who is strong and untouchable and digging into the ways they are weak and need care. It's about a character who isn't expected, or maybe isn't allowed, or maybe is terrified and ashamed, to show pain or weakness finally "breaking" and being able to receive comfort and reassurance. It's about the shame of needing care and the fraught nature of trusting someone with that.
It's about the horror of the body's vulnerability; digging into the ways a body can experience helplessness and violation and really acknowledging how awful that feels and how scary that is.
It's about pain as an inherently private experience, something invisible that can't be objectively measured, and the ways that pain is made visible and the ways pain is judged to need care or to not need care, and how that judgment affects the experience of pain.
It's about the reality of pain and having a body, rendering that directly and viscerally as it is experienced and felt, and how that Reality defies interpretation and communication, tramples over all the social norms of how normative bodies and minds feel and experience.