Hi B. C,
I remember when I was a teacher assistant some 25 years ago in a 1st grade class, a little boy came up to me and said:"So and so (a girl who shared the same double desk as him) keeps on shaking the table and I can't work!"
For a few days I could not figure out what she was doing: grabbing the table or her chair, intently shaking back and forth staring straight ahead, with occasional glances to see if anyone was looking. If her table mate tried to get her to stop, she would get very upset (an otherwise super sweet child).
One day, it dawned on me! She was masturbating. I approached the lead teacher with this information, who received it in as much disbelief as I had. But after a few days of observation she could only come up with the same conclusion. She then called the mother in for a conference. I was not privy to all the conversations about this matter, but it turned out that she had been doing this at home also, and after a few weeks of investigations it turned out her older brother had been touching her.
Now I am not saying someone taught this to your daughter, but you should at least rule it out. It sounds like the pediatrician may have ruled out yeast infections et al... This self discovery is much more common than we would expect in girls. In boys of course, not so taboo. But us girls, we are still brought up with different standards aren't we, so not much info out there on this, especially for such young children.
Obviously it is a natural act, she is doing this out of pure innocence so this is not a cause for punishment, but rather cause for inquiry to how she came about this discovery. Yet, she must understand that this is not a socially acceptable behavior, and just as passing gas, burping, picking your nose, sneezing on people, defecating or urinating in public, it is not acceptable in public so it must cease. You must strive to help her find a positive behavior to replace it, so she distracts herself from the urge, and overcomes it.
I would suspect this is not an easy habit to get rid of, and if your own efforts are not producing results, I would urge you to consult a child behavioral specialist who can help redirect her behavior. There are therapists who use play therapy to help children open up and converse about issues and help them learn ways to modify her behavior. I know it's difficult to spend money on these kinds of therapy, very expensive, have to take time out of your work day perhaps. But look at how much many parents drop cash on toys, game systems, clothes, sports activities, vacations...look at this kind of intervention as an investment in your daughter.
Don't tarry B. C! I would hate to see your daughter embarrassed in any way over this.
In Friendship and Support,
V.