I'm not sure what ages are meant by "secondary school", but this wouldn't work in American high schools. (In most states, starting 9th grade, 14 years old.) The students don't all take the same classes.
For younger grades, that would mostly work.
In Michigan, there were guidelines published for how to minimize interaction, and it involved staggering the class change times. There were also guidelines about who had to quarantine after a positive test. There were guidelines about how much cleaning had to be done at what intervals. The end result was that our local school district decided it was impossible to operate under those guidelines. The two biggest issues were it wasn't realistic to expect distance to be maintained in the halls, and the number of quarantines required in the event someone in the school tested positive would make staffing and access to substitute teachers impossible, so we're online for the fall.
I'm heavily involved in extracurriculars, as a robotics mentor at the school, and we looked at the guidelines and decided that even if school goes back to in person instruction, we wouldn't be able to adhere to the guidelines, so this activity will be conducted entirely online at least through the end of the calendar year. Our big activity season normally starts the first weekend in January, so we will reassess whether or not we will be able to compete this year.
Schools weren't created with the idea of isolating students from each other. I think it's wishful thinking to try and adapt it to those conditions. I think we just have to assess the situation and decide if it's worth the risk. That's a tough pill to swallow, but I don't think anything else is realistic.