I agree that rape as a punishment is and always will be cringe. With that said, I think there's a way for such a thing to happen to a character and it not be the author's punishment, but be a plausible outcome to a character making a bad decision.
But that's certainly NOT this story. The main character communicated worse than a toddler, which makes no sense. The childhood friend ignored all her history with him to vote against him despite knowing he's a bad communicator (should have asked for clarification to the level he's known to not communicate well). And then he never has trouble communicating to anyone else. The author had them immediately stop acting like childhood friends while the rest of the hero's party were as nieve as children when it comes to human nature. None of what happened to her made sense, which is why it's seen as the author punishing the girl and not a plausible outcome to things she did.
Now, the rest of this story is more interesting, and it's possible to basically imagine a more realistic scenario where the worst didn't happen to the childhood friend and the story still ended up where it did, so it's not the worst read ever.