Spent a lot of time in education, K through Ph.D and as a college professor. Net, it seemed that the keys to good or better quality K-12 public school education was simply the parents, their
quality that also showed in careers, income, standard of living, socialization, etc. A lot of that
quality gets inherited, and Darwin wins again.
But here is a surprise: In college my wife made both PBK and Summa Cum Laude, won both NSF and Woodrow Wilson graduate fellowships, and got her Ph.D.
Her high school? Her family lived in Indiana, in a house her father built from some plans in Good Housekeeping magazine, on a 33 acre farm, surrounded by farms raising mostly corn, soy beans, wheat, and chickens. The local town consisted of a church, a school, and a tavern. The school building was a good accomplishment by the community, big enough for the number of students, taught grades 1-12, but had fewer than 12 classrooms and fewer than 12 teachers! Net, the facilities were poor, but the parents made sure the schooling was good.
The school I went to was relatively large, the pride of the city with a quite good Principal for 1-6 and another for 7-12, no bad teachers, and some good ones. They taught Latin, Spanish, and French and had a good math program. The year before me three guys went to Princeton and two of them ran against each other for President of the Freshman Class. In my year, myself and two others did the best on the Math SATs, all went to college, one MIT.
In both of the schools, 100% of the students were well behaved, i.e., no disruption in classes; this was just expected and without any particular efforts.
I really liked math and physics and wanted much more than the classes offered. So, the classes were beneath me and mostly taught myself from the books. So the school put up with that independent approach and sent me to a Math Tournament and some summer enrichment programs, which was good education: The good parents wanted good education.
Later there were some race riots with that school a target. So, the city changed to teaching cosmotology, etc. and picked another school to be a good one.
Net, with good parents, a school can be plenty good with modest facilities.