I don't disagree with you but I guess I don't ever see rape being a just punishment, even in the context of this show. I totally understand your point though, Jamie did seem like he was trying to hurt Cersai for hurting him repeatedly.
I wouldn't normally see rape as a just punishment either, but, yeah, it's Game of Thrones. Rape seems somewhere less worse than genital mutilation, be-headings, torture racks, etc.