I want to get to grips with what it really was and who was responsible and then move on from it.
In society crime deserves measured, proportionate punishment as a deterrent and as reinforcement of rules and order.
In a family children's misbehaviour deserves firm boundary settings and reasonable consequences for bad behaviour/rule breaking. This should be proportionate and for the development and good of the child as well as the family as a whole.
In an adult relationship "rule breaking" should lead to apology, restitution if possible and dealing with consequences. In no way is it right or necessary for "punishment" to occur. There may be a consequence of the action (eg relationship breakdown, loss of trust, etc) but NOT and Never punishment...only forgiveness or non-forgiveness.
Having got out of this damaging relationship I hope you can sort out in your head why it was necessary for you to be punished in any way...does it come from your past? Did it come from your partner's refusal to forgive and to move on? Was it a last ditch resort on your part to be able to repair your damaged and damaging relationship with him (ie if he punishes me he will have to forgive me and we can go on and put it behind us).
His response to the "punishment" as a pleasurable activity is not your problem...it is for him to deal with and you are not responsible for him, for his feelings.
Just make sure you have a healthy view of yourself, can acknowledge that people make mistakes and mess up, you are no exception. No-one deserves to be judged by that thing alone...just learn and grow from it, and know how to forgive yourself.