I just spent 10 days in San Francisco, Silicon Valley and Los Angeles, where I met visionary entrepreneurs and visited Facebook, Google, Apple and Tesla. I am also a wanna-betech-savy-middle-aged-man who reads up on this stuff on a regular basis.

Much has been written about the impact of the fourth industrial revolution — digitalisation, robotisation, artificial intelligence, the internet of things and 3D printing — on modern society.Little has been said about the capacity of democracies or other forms of government to absorb thischange.

The first industrial revolution gave us Marxism. The impact of the fourth industrial revolution will be many times greater. The internet and telecommunication revolutions were peanuts incomparison.

The pace of change is faster than ever. My teenage children do not remember a time before smartphones; their children will go to school in a vehicle without a driver. Things that you had to buy in the 1990s — a camera, stereo, games, watch, CDs or TV — are all on your smartphone. Soon that phone will be ousted by spectacles that bring you both virtual and augmented reality.

Robots are replacing muscle. Factories are becoming automated. So is intelligence. I do not have to ask my wife every time I do not understand something — Amazon’s Alexa will help me out. Machines solve complex tasks. Algorithms take care of mundane administrative jobs, do the analysis of markets and roam through thousands of pages of case law. Goodbye secretaries, market analysts and lawyers?

Even newsfeeds are created with the help of AI. Before politicians cheer at the prospect of aworld without journalists, they should remember that algorithms will soon be better at legislation than they are. How about letting an algorithm decide the optimal Brexit deal? Then we will know whether “No deal is better than a bad deal”. Well, perhaps not quite yet.

There will be no lack of ethical questions once homo sapiens begin to become a hybrid between man and machine. The prospect of a 150-year life is not far off. What will that do to school, work,pensions and our understanding of death?

I am all for free enterprise, but I do believe that we must create an ethical code for the fourth industrial revolution. Much as nation states have constitutions and laws, we need rules for the basis on which we advance technology. I vote for good, rather than evil algorithms.

The transition will be disruptive. Are politicians and legislators ready for this disruption? I think not. Studies claim that approximately half of current jobs will be lost in the next 15 years. How will democratic politics manage the transition? A basic income might help, but that will not be easy with a declining tax base caused by e-commerce and a more circular economy.

Big data and AI will be used by politicians to win elections. Will this be a victory for the demagogues or the mainstream? That will depend on who codes the algorithms. Elected politicians are often from an older generation which is not necessarily up to par on the latest technological megatrends. At least we are not yet at a stage where a social-media-empowered animated figure is in a run-off with a human.

International and national institutions are hopelessly slow and bureaucratic. It takes 10 to 15 years to frame a trade agreement; in the world of e-commerce this is more than a lifetime. Perhaps it is time to think seriously about an e-EU or e-WTO to tackle trade.

There are two ways to approach this revolution. Tech optimists argue that when old jobs vanish, new ones emerge. Productivity and transparency increases, money is saved and tasks are performed more efficiently. Human beings live longer, healthier lives. Basic needs are taken care of. We have more time to pursue happiness.

Tech pessimists point to the danger of technology taking over our lives. Opportunities to use and abuse power are plenty. The manipulation of algorithms, intrusions on privacy or cyberwarfare are but a few examples of problems raised. The future of mankind is at stake.

The truth probably lies somewhere between the two visions. The opportunities are as real as the threats. No matter how far we take robots, machine learning or AI, there are two things that technology will not be able to replace: empathy and human touch. I know scientists are working on this, but we are still far off.

We tend to overestimate short-term change, but underestimate long-term transformation. Be this as it may, politicians must understand that the fourth industrial revolution will transform democracy, society and mankind in the not so distantfuture.