The outgoing US president warned against power in the hands of the wealthy, the threat of the tech industry and climate change.