What to do with such an economy? Basic income. Tax the profits and give everyone sufficient income to pay for the basic necessities. That's one of the conclusions of the 2011 book Race Against The Machine, by two MIT professors.
So we can either separate money from morality, or suffer greatly as jobs - especially blue collar jobs - are automated away.
Alas I fear there will be great suffering...