Another teacher here.
I'm not going to pile in on OP though I can't see the big deal about the punishment.
I am just 
at this bizarre back and forth about what happened in the classroom.
OMG she had to sit at the side. Omg she had to cross her legs. Omg soooo embarrassing to be put on the side away from everyone. They could seeeeee me.
Er...what??
What the hell do you expect a teacher to do with a misbehaving child? Give them a cuddle?
Why is your daughter and you whining about having to sit on the side? I know you keep saying you were ok with it but the words and tone of your posts suggest otherwise. You understand where your daughter's coming from. Why?
Do you have any idea what it's like when kids are lippy in class/talk over you/ignore instructions/ do whatever the hell the like?
And then they have the nerve to be affronted by the consequences.
I have had kids come and sit at my desk to work. Embarrassing!! So what?
I have sent kids out. I have had to call emergency support which is where someone comes to remove a child in front of everyone. Gasp!
I have moved a child to a table sat on their own and made them work by themselves. Is that sadistic?
She had to sit one her own at the side in silence and cross her legs. So flipping what? And when she complained to you, even though you didn't say it your tone here suggests you think her complaints were justified.
Ooh it's so hard for my poor baby to cross her legs for half an hour. Puh-leeeze as my kids would say.
Running outside. They wouldn't do it at my
School but if it was my kids I would tell her to shut up and behave in class. The end.
The sexual harassment you believe happened should be addressed separately.