I can sorta see what you're trying to do, and I'll summarize just for clarification (and please lemme know if I've gotten things confused
).
This MC has been in a relationship that sorta ruined their interaction with sex and romance. And while they might have grown from it, it still lingers. But they're going to masturbate for themselves first before letting someone else touch them sexually.
I think I understand what you're doing. After all, masturbation in and of itself can be very self-liberating, and it can increase someone's sexual confidence and general confidence in themselves. It's like a "I need to know how to love myself before someone can" type of mentality, as in knowing what you want sexually and trying to find a partner who respects that.
In this case, the MC is doing that as a sign of "I can't let the experiences I've had ruin me nor my love for myself. If I can love myself and show pleasure to myself, then I can definitely find that in someone else again. But I just need to learn to see that in myself a bit"
I can definitely see that as character development, especially if ttheir past relationship worsen their confidence and made them feel inferior without the other. It might have more meaning if it's private as well, meaning they're not doing this in front of someone.
Now, how you do that can go in a lot of ways. But it does have to sorta be akin to the site's rules (especially if this is really explicit). You can use flashbacks to contrast between how the MC felt with their partner and how they feel now. You can also use their ex's words and actions to emphasize how this must be a big step for the MC. It's also good to give a bit of emotions behind the action and how the MC begins to feel good for themselves.
It doesn't have to be straight up smut (keeping the rules in place). It can still be sexy but also amazingly liberating, showing the audience someone who got their groove back and sorta learned how to love themselves. Even if it's sexual base, masturbation out of willingness and pleasure for one's self is a very good way to show that character is beginning to see themselves worthy of pleasure (whether that's love, sexual relief, friendship, success, etc).
I sorta rambled a bit, but I hope this helps!!