The chief of technology company Tesla sees no future for coal, but he is very worried about machines posing a risk “to the existence of human civilisation”.