I think the school->prison pipeline is a real issue, but I think a poor quality of education is a much bigger deal because smart, educated people generate exponentially more wealth since the industrial revolution. If you want what is best for everyone, you would focus more resources on top-performing students rather than less! Sure, top-performing students would turn out better than mid-performing students—even with fewer resources—but that's a tautology and an emotional appeal. I think the tricky part is to make sure top students give back to society once they graduate, but that seems more of a cultural issue to solve. Boring students to death probably doesn't help, though.

Now, you brought up that national testing + placement would mostly reflect socio-economic status. I think this is concerning because it lead to in-groups reinforcing themselves, which naturally decreases motivation for future rich people to help the rest of society. However, we already have examples of placement tests, and this isn't what happens! NYC has several "specialized" schools, including one of the best high schools in the nation, Stuyvesant. Admissions to Stuyvesant are entirely based on your rank on the SHSAT, yet 48% of their students are "economically disadvantaged" according to USNews. I'm not entirely sure what that means, but I would expect lower or lower-middle class. This data also matches up with my intuitions: although intelligence is heritable (through genes or upbringing), there are exponentially more "economically disadvantaged" people than rich people, so even though rich kids are overrepresented, they are still outnumbered by poor(er) kids.

Also, keep in mind that rich people will always be able to pay for private schools or tutors if they find public education lacking. So, you are really only depriving poor students of any possibility of a good education by lumping everyone together, which is worse for reinforcing classism. As you mentioned, charter/private school outcomes are so much better because they work pretty hard to cherry-pick kids that lead to better oucomes. Why not give everyone that opportunity?

That's a little facetious, because not everyone has that opportunity. Some people are just not genetically predisposed towards exams, or they're being abused at home, or they have to work after school to buy food for their younger siblings. But, it doesn't really matter why someone cannot do/be better if we're unable to fix the why. Until it can be fixed, the problem is just a part of them and they'll be punished for it. This isn't very sympathetic, but it's the game-theoretical optimal approach for getting to the Pareto frontier.

You mention that blame/punishment essentially never works, which is probably because humans are not perfectly rational agents. Sure. I've definitely seen this when I play Risk online. You have to use different strategies when people are irrational/prone to mistakes, e.g. with novices it's usually good to make a big stack and wait for everyone else to noob-slam, while with masters it's better to work with the othe rplayers to slowly choke out the rest. Optimal strategies may be less tolerant to mistakes, and a common mistake humans make is, "this person hurt me, so I will hurt them even more," without considering why they were hurt. A common theme I saw in school->prison pipeline studies is that youth get disaffected with society/the justice system, so they end up committing more crimes. If people really are being irrational, in such a way that punishment will not work, you really only have three options:

1. Force them into rationality.

2. Rehabilitate them through positive reinforcement.

3. Eliminate them from society, e.g. sending them to Louisiana/Australia, prisons/executions, or closed communities.

I'd argue that you should take whichever option is best for society, i.e. costs it the least. Why?

a) Societies cannot be comprised of mostly (weighting by utility) negative-externality people for very long.

b) Everyone else is better off by eliminating such people, thus they are motivated to do so in whichever way is cheapest.

If it were cheaper to just execute all criminals, or commit horrific human rights disasters to make prisons cheap to run, that's what society should do. Historically, that's what societies have done. Nowadays, it probably isn't cheaper; even if the average inmate spends just as much time in prison as out of it, they are probably close to net-positive to society. The cheapest solution probably is rehabilitation for most people except the unfixable, and even there, life in prison is probably cheaper than execution.

So, I think I agree with you about rehabilitation, but probably not for the reasons you cite. I think "people being products of systems" is a rather naive take; if people were products of stable systems (in the physics sense), punishment actually would work. Conservatives have a bias towards everything being a stable system [which is true; you are exponentially more likely to end up in more stable (determined by transition probabilities) trembling-hand/thermodynamic equilibria], which is probably why they're all pro-punishment and such. Note that rehabilitation can still be cheaper, but at least punishment would work. It's only when you have unstable systems that punishment might not work at all. It's a little worrying to think that America's system might be unstable right now, but the race riots and past two elections kind of show it is. More accurately, it's too easy to transition out of its current maximum for punishment to really dissuade future malcontents.

-----

Alright, let's return to education. I think we're in agreement that:

I) The school->prison pipeline is real.

II) Imprisonment is expensive, probably moreso than rehabilitation.

As I put at the top, we probably disagree that:

III) This cost is more than that of a poor education system.

I think rehabilitation through the education system is far more expensive. Here's just a back-of-the-napkin calculation. Suppose that all inmates are directly a result of the school->prison pipeline. It costs ~$70bn/yr to incarcerate them, but let's also assume we're missing out on 2 million people * $65k/yr = $130bn from jobs they could be working. This amounts to about $200bn/yr in costs to society.

Now, the number of billionaires increases by about 36 each year, and the average billionaire has $7bn. If a better education were to double the number of billionaires produced each year, this would entirely offset the cost. Of course, billionaires are usually better at capturing value than producing it, but at least some educated STEM guy below them is producing the value. I think this is entirely doable by expelling more students. In fact, I think the justice system will only start costing more than the wealth generated from better education (through the top students) once the pitchforks and torches come out.

Similarly, we should be able to do a cost-benefit analysis on teacher salaries. In reality, the most efficient use of money is to pour it into the top schools (and have entrance exams), but the metrics don't look as good. Most legislators care about the quintiles, not the top 0.1%, plus the wokists hate inequity. And, even bottom schools need much better teachers than are currently around. That's why I want to raise all salaries to $300-500k/yr.

You mentioned that only $236bn is spent on ~4m teachers, but there actually is another $600bn going elsewhere. If you want an average class size of 20 students, you only need ~2.5m teachers, so it should be possible if you strip everything else to the bare-bones. My elementary school class was taught in a portable, and I think that's better than having a shitty teacher.