Today machines aren't a source of economic value, they only are crystalized labor-power. But lets assume a hypothetical future where machine-workers have become the equivalent of humans. That means they re-produce them selves and they can generate economic surplus on top of that.
Machines, robots, androids etc are not the one's displacing people. Automation on it's own has never done that. The problem is that capitalists are trying to abuse machines to increase their personal share of the economic-output at the expense of pretty much any other consideration.
If you organized the economy in a sane manor, machines and people would just work together and cooperate for maximum desirable economic outcomes for everybody.
When the capitalists force people out of work they reduce the overall output of the economy. Even if people are inferior to machines at a task, removing people is still removing a net economic contribution. Which shrinks the economy relative to a machine-human-cooperative model. The capitalist choose the machine-human-competitive model because that generates more for them personally, even if that results in an overall much worse economy.
Remember capitalists are the ones that are making workers un-employed. Technology is not the source of Un-employment or economic insecurity.
As a rule of thumb
In capitalism, the capitalists are the source of most problems.
Most of the suffering is caused by labor-competition.
Also if human-equivalent-androids were ever constructed, the surplus from human workers would be the spark of life that created them, and the cyber-punk mega-corp that seeks to own and control them would be doing slavery of artificial people. Human workers and android-slaves would be natural allies.