I take it from your name that you are French. Here the quality of the school has more to do with the education of the patients and the general "proper raising" approach.
Take Versailles for instance. The best school there attracts peuple from vastly different backgrounds and wealth. This is not a discriminant but rather how parents educate their children.
Private schools have a payement system that takes into account the revenue of parents.
Sure,you can buy your way to education but you will never hit the best (or even good) schools.
Then you have the worse neighborhoods, the problem there is a lack of interest or time of the parents rather than money on schools (they get more than the affluent neighborhood ones, take the north of Paris as an example and look at their infrastructures vs the ones in, say, Versailles).
The same in the US. New York City spends more per student than anywhere else in the US (https://www.silive.com/news/2019/06/how-much-does-new-york-c...). Baltimore, an incredibly poor and run-down city, spends the third most. #4-6 and #8 are all wealthy suburbs of Washington DC, but their schools are all far better than those of Baltimore or NYC (on average), despite Baltimore spending slightly more per student and NYC spending 60-70% more.
As you say, parents taking interest in their children's education is far more important than money spent.
I have first hand visibility on this (though obviously on limited data) when looking at the classes my children go to.
I live in a cozy neighborhood but the classes are mixed. Primary school is mixed because of social mixture and one can see that the children who are good are the ones pushed for that. Teachers clearly pass the message of "it is your work that is going to help you" (they do not even talk about money because it is mostly irrelevant in France with out education system, at least in terms of paying for school (the other costs like housing etc. is another story)).
Then you move to high school, we have several of them in my city. One is in the very top of best schools in France and the students population is not that different: you have people from all wealth and the common denominator is that they work (hard). It is not possible to buy your way into that school.
What I see is that the children care and their parents care. They either give an example (because they are well educated) or push the children to get off the social caste.
Unfortunately there is also a mass factor: a few people significantly off in a class will not be a problem. When nobody in your neighborhood cares about education (despite having access to it) then it is much more difficult for the ones who want to work.
Finally, there is often a perception in socially lower neighborhoods that the best schools are "not for them". It is not a matter of money, but of perception. I followed two high school students (a boy and a girl) for a few years - they were brilliant and I pushed them to try. They did and succeeded in ivy league schools (grandes écoles in French). They told me that they would have not even tried, again because of perception. Now they are "giving back" to their community by passing the right message.
1. https://www.nytimes.com/2020/07/23/podcasts/nice-white-paren...
We need to separate school funding/quality from neighborhood affluence but that's a tall order politically.
A list of relevant articles https://reason.org/author/corey-deangelis/
I bet if you took took the Cupertino school district families, and transplanted them into a much worse school district, and kept the same teachers, same staff, same buildings, same funding level of school, you would see the school district improve, even without the funding.
The issue is the families in poverty don't have the time and energy to care about school. Wealthy families, care about school. So even if the school is crappy, they will make sure their kids learn what they need to. In impoverished school districts, teachers can't concentrate on teaching, because they have to act as both teachers and social workers and advocates for their students.
So even if you increased the funding of schools, if you did not address the poverty in the surrounding community, it will mostly be a waste of money and political capital.
https://www.latimes.com/archives/la-xpm-1996-03-27-me-51685-...
https://ed100.org/lessons/whopays
In affluent areas the local PTA often gathers donations from parents to fund extra programs for things like sports, music, and technology.