Senator Bernie Sanders warned that artificial intelligence (AI) and robotics could push many Americans out of work while company executives keep the profits for themselves.