The worthlessness of most middle management jobs has nothing to do with software. If they were flat out eliminated, in most cases, nothing would change. There's no software needed to replace them.
The great irony is that it's exactly that arrogant ignorance and inability to understand what happens when large numbers of wildly different human beings try work together why middle management continues to be necessary.
It's like saying we don't need janitors because we can self-organize and all clean the company toilets ourselves.
It's a claim that is as true as it is ignorant and naive.
Just because we (usually) need managers doesn't mean we need managers of managers of managers of managers of managers of managers of managers of managers of managers of managers of managers of managers of managers of managers. That's the primary observation, here: that the quantity of management staff is needlessly bloated, and the levels of indirection between the highest-level executive and the lowest-level subordinate are excessive.
You're trying to paint a picture where the only options are either having five janitors per room or having no janitors at all. The point a lot of others are trying to make is that we just don't need as many janitors.