The reason private schools are so successful is because, mostly, they are selective and all the children attending the school come from homes where education is valued and the parents can support learning at home and through the time they give to taking children out and about and encouraging their interests.
My children went to private secondary schools in the 1980s. The school could not have been more different DD went to a highly selective girls grammar school, the more successful its results, the more parents wanted their daughters to go there, so the better the results were, so the more competitive entry became. It was a 'virtuous' circle of more and more able girls and increasingly good results. Class sizes were around 30 and some girls lived up to 30 miles away
DS went to a rural boarding school close to home, it was small and relaxed and considered 'progressive', but, again, selective, and, again got very good results. Class size was around 30. People get too obsessed about class size.
Have a look at the best state schools, they are effectively selective. They are usually in affluent areas, and house prices in their catchment areas rise because parents want their children to go there, so a larger and larger proportion of pupils come from homes that are similar to the homes of children at private schools.
The only way state school results will be as good as private schools, is if you make them selective. Does anyone want to return to the 11+ and dividing children into sheep and goats at 11?
Most of the children at private schools, if attending state schools, would still be up in the top groups and would still be going in disproportionate numbers to the top universities and into the top professions, because they are a selected for their private school because they are among the brightest children anyway.