This is horrendous! I wouldn't want my child or anyone else's in this situation. Punished for not getting skills? Ridiculous at any age!
At our gym, the coaches for the little ones are mostly gentle, grandmotherly types who happen to be in awesome shape as former gymnasts. Also, they are coached by the 30- and 40-something head coach and assistant coaches who will be with them throughout if the gymmies choose to stay in until high school. These are not college or high school students. That your dd's current gym's pre-team's coaching is left completely to those so young is not, IMO, the best situation. Note that I say "completely;" they could, IF of the correct personality and character, make wonderful assistant coaches. (Obviously, these 2 are not.)
I'd let the owners know immediately of the situation and history, and if the immediate response was not what I wanted (i.e., total genuine shock, support of legal action, AND removal of coaches involved), I'd hightail it out of there. (To stay may cause the already cruel coach/coaches to be vindictive against your dd even if they are reprimanded, which is, BTW, way too light of a consequence for them.) You may even consider leaving if the response of the owner is exactly what you want, as your dd may hold such awful memories of the humiliation and abuse there, and that may, understandably, prove too much to face for her.
Your little 5-year-old's spirit is too precious to risk being crushed by such outright abuse. Also, she'll soon hate gymnastics, and, more unfortunately, herself, as she won't know that she is not in the wrong at all.
I'm so sorry that this is happening, but am relieved that you are aware and willing to take action.