I understand the impulse for smaller schools, trust me. I think you'd be surprised to look into city schools and the capacities they were originally built for, compared to the amount of students they serve today. Part of that is land value and construction costs, but many urban schools are in a version of just-in-time maintenance. Your solution for more smaller schools is at play in suburban areas, and result in some really high-quality private schools. In the US at least, most school expenses are funded through property tax, so higher land value and wealthier areas are able to support better schools.
IMO there's a lot of credentialism in education already, need a master's degree to be certified (I do not, so I am a beneficiary of the shortage of math teachers since they needed to relax requirements to get people in classrooms). You can imagine my views on teachers' unions differ from yours, but firing bad teachers presumes supply outstrips demand.
High schools in particular have already become those communal neighborhood facilities for sports with baseball, basketball, tennis courts.