I used to teach ballet and I danced professionally. Her hair doesn't look very long, so you could make a ponytail with a fabric ponytail holder, then you can leave it as is for the next part, or twist into a bun and (this is the trick
): wrap a hairnet over the bun and ponytail holder. You'll probably end up doubling the hairnet. Most of your pinning will then be done into the net near the scalp with bobby pins or hairpins. This makes a neat-looking bun without a lot of twisting or tension and holds together very well through lots of jumping and spinning - and without the pain and frustration of tons of pins.
The bun you show looks great - you could just secure it with a hairnet and some bobby pins.
Hair nets are really the way to go - it's so much faster than trying to secure a perfect bun and they hold the hair in place so well.
Here's a visual aid: How to make a perfect bun
Notice in photo#6 how the's pinning away from the bun? You insert the pin through the net, directing it away from the bun, then you tuck it under a little more hair/bun back towards the bun. This pinning technique is rock-solid, so take care to not pin too tightly because it won't loosen up.
Be especially gently with the twisting and let the net do the work for you.
Hairspray was always our solution to shorter hairs that escaped the bun, but spray gel or a little gel or pomade on your fingers would work to smooth in stray hairs. Leave-in conditioners if you/she uses them will help prevent friction and should buffer some of the effects of shampooing. Washing hair with diluted aloe vera juice or herbal tea can work in place of shampoo - sweat on the head usually isn't too yucky and rinses out fairly well.
Hope she is loving her classes! What a cutie.