What jobs are safe in an automated future?

The trends are clear, more and more work that was previously done by humans are being shifted to automated systems. Factories with thousands of workers has been replaced by highly efficient facilities containing industrial robots and a few human operators, bank tellers by online banking, most parts of any logistics chain by different types of automatic sorting, moving, and sending mechanisms. Offices are run by less and less people as we’re handling and processing fewer and fewer physical documents. In any area less people than before are needed to do the same work as before. The world is becoming automated.

These developments are not only here to stay—they are accelerating. Most of what is done by humans today could easily be done by computers in a near future. I would personally guess that most professions existing today could be replaced by affordable automated equivalents within 30 years. My question is: What jobs will be the last ones to go, and why?

Often education is pointed out as safe bet to ensure being needed in the future, and while that is true its not the whole story. First of all, in basically all parts of the world the fraction of the population with an academic degree is growing fast. Higher education will probably not be as good as a differentiator in the future. Second, while degrees in the fields hot in the future is hot in the future there is no guarantee that the degrees hot today will be of any use later on. Third, there is a misconception that highly theoretical tasks done by skilled experts will be among the last to go. But due to their theoretical nature such tasks are fairly easy represent virtually.

Of course as we progress technologically new doors are opening and the hottest job year 2030 might not even exist today. Any suggestions?