You're right, but history has shown that increasing the productivity also leads to increased demand, which is good news as long as humans remain involved for some percentage of the work
When you add the cost of education to the mix, automation often leads to progressively unemployable people that need to spend money they don't have in order to access a different job market.
It is not a trivial problem to solve.