Many institutions are ineffective because of the type of labor available to staff them. In theory there's no reason for prisons to be hellholes of abuse and rape, but in practice they're staffed by sadistic halfwits who couldn't find other work. Similar problems with schools.
This is one of the things that could potentially be solved with a smarter workforce, so the future might actually solve such problems in my lifetime. If we can get past the political hurdles of gene editing, there are snowballing returns on existing knowledge given new resources