First of all these "classes" shouldn't really be seen as fixed groups, but rather as descriptions of the economic means by which people make a living. So do they use capital to make other people provide for them and generate them profit or are they selling themselves to someone else to work for a living.
So these classes don't have to share a group identity and the wealth level is only partially reflecting the class. Just because Marx argued that the "working class" should develop a "class consciousness" and unite rather than let them selfselves be pitted against each other doesn't mean that there are these fixed bubbles of the "working class" and the "ruling class" or that people are aware (conscious) of their status. Like how it's fairly common for people to self-identify as middle class (upper-lower-left-right-bottom-top ...-middle class) to avoid a calling oneself poor or rich, which might come with stigmatizing stereotypes. Which on the other hand means that they still reproduce these stereotypes and for example look down upon people who are in a similar situation as themselves rather than join forces and make it better.
So an antagonism against "the ruling class" will do nothing to change this situation unless it also changes the material conditions and the way things are organized. Otherwise there will be a new capitalist class and a new working class but the concept of classes wouldn't change.
Now in terms of extraction of surplus. Well think of it that way. Suppose you are a producer of product A. In order to produce A you need to train 3 years and then invest 20h of work to make a specific product of A. There's always some variation like some will take 4 years others 2, some will make it in 18 hours some in 22. But it's feasible to on average eyeball the stats and nail it down to 3 years for education and 20 hours for production.
Now let's say you want to supply 10000 customers that need the product once a day. So with an 10h workday that means you need 20,000 people working on that task and probably a few more to allow for weekends.
Now suppose someone invents the steam engine. It's prohibitively expensive and so few people can afford one but you're lucky enough to have that capital to invest. With that new steam engine you set up a device that yields 1000 units per hour. So that you can supply the whole demand (with some surplus if it runs around the clock) and it only requires 100 people who are trained a week to operate the machine.
So previously the price of the product reflected the cost of purchasing the raw material, the labor cost and the profit. Where the labor cost is at least the "cost of living" of the laborer. Like they are occupied most of their waking day occupied doing work so they need, food, shelter, recreation and so on to not just die, plus they might need to pay back loan for the time when they were trained and didn't receive money or when the employer paid them despite no output due to training and so on. And profit is what remains after you've substracted the cost of raw material and the cost of living.
Now to extract that is essentially stealing from the employee who's labor created that value. Now suppose the raw material is $500,000 the labor cost is idk $20x10 hours x 20,000 people = $4,000,000. Suppose you sell it for $500 a piece you'd make $500,000 in profit which if you keep it is 2500 times what the average worker is making. Meaning if you run this business as-is you'd already create a growing social inequality by the day.
With roughly stable prices that would mean that you could buy 2500 times what the average worker is able to buy, meaning you could easily create shortages or run operations where you employ the working time of 2500 people. That's already some serious power you could wield.
However suppose those numbers aren't of one factory but those were all independent workers doing their work at home and keeping the $50 profit for themselves. It's steadily growing but not merely as fast and would not yield that much of a social power. However the manufacturer with the 10,000 products already has a more stable and streamlined production with a more stable quality and shorter production times and more items in stock so they might already put people out of work and make the sacrifice their profit in favor of at least netting their standard of living.
Now suppose someone invents the steam engine and because you've got the capital in stock due to exploiting 10000 people (stealing their profit) and others don't you invest that capital. Now you can produce 1000 units per hour, meaning you can saturate the demand and more and you're only need 2 shifts of 50 people to run the plant around the clock and they only need a week of training to operate the machine.
While the employer might pay them $10 each (lower skilled work) reducing the production cost to $500,000 +$10000 labor cost + $10,000 for idk coal for the steam engine reducing the production cost to $520,000 while probably selling at the same price of the competition. Making a profit of $4,480,000 or ~45,000 times of the average worker. Sure over time the that profit will decrease, more people will be attracted by those profit margins and invest in steam engines likely reducing the price from $500 to $60. But in the meantime a lot of capital or social power has changed it's owners. That is what previously fed 20,000 people has now made 1 person filthy rich.
Whereas the remaining 100 workers have only half of what they used to need for their standard of living and the 19900 don't have any income and have their hard acquired skill set be worth nothing.
So without work, without savings (minimum wage) and without a paying education (the one they had is useless) they need work, fast, unskilled and even low paid as they need something to pay the bills. Meaning it further drops the price of labor and contributes to immiseration.
Now that doesn't mean that technology is bad, far from it, but it exaggerates an already existing tendency for inequality in the mode of production. And even if over time profits are falling the wages will no longer increase on their own.
So the economic situation is anything but stable, but worsening and the social inequality resulting from that was explosive. Which is why even conservative politicians at the time at least introduced stuff like social security to provide a rock bottom instead of a bottomless pit. While Marx was rather in favor of simple making that technology common property so that everyone contributes and shares the benefit of that increase in production not just a selected few.