McDonalds made $11 billion in 2019. They employed 210,000 people. They therefore made ~$52,400 per worker in profit.
A $10 / hour burger flipper makes ~$19,500 per year.
Those burger flippers are compensated poorly because of labor market competition. The value they provide only puts a ceiling on what it is possible for them to earn for their job to exist.
The actual prevailing wage is determined by, frankly, how desperate the low skilled pool of labor is. If unemployment goes up, that means greater desperation. If public sector compensation goes down, that means greater desperation. If social services are cut that means greater desperation. If overseas workers in a country that practices chattel slavery starts taking orders, that means greater desperation. If prison workers start getting in on your industry, that means greater desperation.
All of these things mean wages go down.
This all has absolutely fuck all to do with automation. It is largely about power.
The Roman empire also had mind-bendingly high levels of income and wealth inequality and they weren't exactly automating everybody out of their jobs. They were a society built on the selective application of extreme violence.
Automation does provide the perfect excuse for paltry, declining wages though, largely because it's nobody's fault. If I were an industrialist I'd for sure be gently guiding the pointy pitchforks in the direction of the robots while I outsource, use prison labor, lobby for reining in public sector wages/pensions, cutting social services and gorging myself on gargantuan profit margins. I'm squishy and they are not.
The other useful aspect of the automation narrative is that it plays well with outsourcing. Americans don't see the labor intensive factories that leave its shores in search of more impoverished, cheaper, possibly even slave labor.
What they do see are the factories that didn't bother offshoring - the ones that required a small amount of highly skilled labor to maintain automated production lines, where the headache of offshoring wasn't worth the hassle.