Don't think about money, that only confuses things. Think about resources instead. Imagine that the worker burns oil to survive, and the robot also burns oil to function. Now replacing the worker with the robot makes the economy burn twice as much oil for the same amount of production (assuming the worker goes on welfare). If you think in terms of money and pockets, the picture will be more complicated, but the end result will be the same.