I agree the way the school has gone about it is bang out of order. No one, but especially girls, should have their skirts checked to that degree by any adult male or female. You can tell by a quick glance if a skirt is roughly knee length. Having a rule about the exact length of a skirt is ridiculous, as long as its within a couple of inches of the knee then it shouldn't matter. As long as they can walk up the stairs without flashing their underwear then the skirt is long enough.
Imo it's not sexualising children to tell teenage girls that it isn't appropriate to go to school in a skirt that barely covers their arse. That might be appropriate for an adult going clubbing but not a teen going to school. I'd also expect if a boy turned up in booty shorts or skin tight leggings to be sent home to change into something more appropriate for school.
Telling girls there skirt is too short and will distract the boys, or worse male teachers, however, is sexualising.
If a female teacher, or a male one for that matter, turned up to school in a skirt as short as some I've seen on high school aged girls round here I'd expect them to be told it's inappropriate for the workplace and to go home and change. It's about dressing for the job.
At one of the local high schools a lot of the girls wear skin tight tube skirts so tight they can barely walk and so short it barely covers their arse, you can't miss them walking down the street pulling the back of their skirt as it's so tight it rides up as they walk. At my dcs high school they have to have a pleated skirt so at least they can walk properly but of course some do roll it up as high a possible.
I'm completely against the loos being locked though. Access to a toilet is a right, not a privilege. Even prisoners have access to a toilet at all times.
At my dcs school there aren't enough toilets for everyone to go at break. Lunch is staggered but they only have 30 minutes, couldn't eat outside and the lunch hall is so small so there's a few times a week dd hasn't had time to eat nevermind had time to queue for the toilet. Thankfully the new head went back on the outside eating ban due to complaints from parents but there still isn't always time to use the toilet and eat due to queues, especially for the girls. I'd rather they extended the school day by half an hour and gave the students an hour for lunch so they'd have plenty of time to eat and use the toilet.
If they need to go during lesson they have to ask the teacher who has to call an SLO to escort the kids to the toilet even if they have a toilet pass. This can take quite a few minutes so if they're desperate, have period flooding or suddenly come down with a stomach bug, they run the risk of an accident in front of the class and being humiliated. I've never worked anywhere that locks the toilets for staff. I've worked places where you aren't supposed to use the toilet outside of breaks but if you suddenly need to go then you can go.
My dcs high school has cctv in all corridors so it would take all of five minutes to find out which students are abusing toilet breaks or causing damage so I don't see why they have to lock all the toilets.