Prevention is the best answer. They have to go to school even if it's going around. But they don't have to go to gymnastics camp. I'd seriously consider keeping her home.
I became the head police when my kids were little. Exposure prevention is key. I would dive from the opposite side of the room if my kid picked up a hat (or even ears at Disney) and looked like they were going to try it on.
Lice don't jump, so require contact to spread. You must teach your child to minimize opportunities for direct contact.
The other important piece of information is that they only live for a couple days without a live host.
If you are treating a person, you need to be treating the house and anything else their head came into contact with. This is a huge amount of work, but needs to be done. Things that can't be washed or sprayed can be bagged and set aside for a week or so.
We went through lice a few summers ago after my kids attended an event where they all got to try on a fireman's hat and someone in the group overshared by giving everyone lice. We did the standard OTC products and got it taken care of in a little over a week.
People hosting an event like that should know better. Shame on them. They had a speaker at my daughter's grade school where they asked for a volunteer to try on some pioneer clothing including hat. I cringed when my daughter said she had volunteered. I immediately became "that parent" and called the principal to give her a piece of my mind. They should know better
I worked at a camp once where the source of the lice were the helmets (for zip lines, bike riding) - and they lived from one season to the next. So be careful of helmets as well as sharing other head gear.
We were fortunate DD never got them (and she did gymnastics for many years), but I always kept lice treatment on hand in my bathroom closet just in case, given what I saw at the camp.
Our first case came from a shared batting helmet at the YMCA. I was young and naive then.
I got a crash course in lice treatment soon after when both boys started scratching. The fact that one of the boys on the team had shaved his head recently and showed up with his own helmet then made more sense. Shame on those parents for not warning everyone. My husband started coaching after that and I started every season by explaining to parents why they needed to buy and use their own helmets.
I'm pretty sure my boys also got it several times from one of those chain haircutting places. It abruptly stopped for good when I bought my own clippers and taught myself to cut hair.