The problem with online education is that a big part school is about acquiring social skills and learning to cope with differences of opinion, of culture, of interests, etc.
To be fair, I am not sure children really learn those things nowadays because you cannot learn this if there is always an authority figure resolving the dispute on behalf of children or even teenagers. Back when I was a kid (the 90s are not so far gone), the rules of imaginary games were negotiated among ourselves. Any disputes needed to be handled among ourselves. Everyone just knew you don't rate out your mate to an adult. Getting adults involved was a sure way to be deprived of friends for days. Adults also had a profound distaste for getting involved, except for extreme cases like someone getting hurt really bad or bullying getting so out of hand things were getting closer to assault than insults. A big part of Haidt's argument about the causes of new phenomena on college campuses concerns the fact the things I just mentioned got increasingly scarce in the late 90s in the US.
The only way you get it is when you let people solve the mess they created on their own. So, if the world eventually turns to much cheaper online education (a teacher can record lectures a few times and use them repeatedly, so it is a very efficient way to convey information), we would also need to find a way to get people to learn how to cope with conflicts, small and large. You have to learn to weigh your own goals against those of others in a way that allows you to reach an agreement whenever possible. You have to learn to discuss various options calmly with people who don't see things as you do and to learn how to stop arguing and move on when none of the people involved can converge on a single opinion. These things are more important than most of what people officially learn in class, save perhaps for reading, writing, and counting.