Historically, distance was a big source of economic friction. This make local retailing and manufacturing a profitable enterprise. As shipping became cheaper and more reliable, local retailing and manufacturing became economically impractical.
Another source of economic friction that generated a middle class was the need for a large number of middle managers and clerical staff to operate a large enterprise. This had two effects. One, it employed large numbers of people. Two, the cost of operating the organization scaled faster than linearly, and this prevented organizations from scaling to planetary scale. Computers have eliminated both those obstacles.
Perhaps the middle class was merely an artifact of the period between the Industrial Revolution and the Computer Revolution, and is now gone forever.