The movie "Idiocracy", in its first five minutes, tackles this exact same question, in hilarious fashion.
Suffice it to say, technology will evolve to accommodate (barely) the lowest-common denominator of intelligence, which has a significantly higher rate of replication than the smart people have (which is so low they will die out).
In other words, many believe the not-so-smart will do better than the "more smarter" people, by many measures.
There is fundamental concept in economics called comparative advantage, which implies that everyone can provide value to society making both themselves and everyone else better off in the process. So theory would imply that it is not a big problem.
Leaving theory and moving to the real world, Note that in the past agricultural jobs were the focal point of the economy and people were very worried about new plant technologies and large scale production. They worried - 'What are people going to do when we don't need farmers?' For the past 30 years or so the economy has been losing manufacturing jobs to low cost countries and automation. All during that process and even today people have asked, what people are going to do when all the 'good' manufacturing jobs are gone? In both cases the jobs are gone and never coming back and it also hasn't been a problem.
So just like the ordinary people that didn't become farmers and the ordinary people who didn't become assembly line workers are, today, contributing to society; theory and practice suggest that ordinary people that don't become technologists will also, in the future, be contributing to society.
I think it's misleading to say 'smart', as intelligence is context dependent, so its probably more useful to say skilled.
The people we need to worry about then are the ones who don't have the motivation, environment, resources or courage to reskill.
Particularly in this day where employers hire only employees with the exact skills they need, a symptom of employer/employee loyalty both ways disintegrating, its going to become more and more important for companies to have reskilling programs, and for government to incentivise that sort of behaviour.
What will happen to the people who still don't reskill? Given that robotics is going to destroy most of the unskilled labour market, it doesn't look good
A stronger version of this problem is the speculations about the "age of mass robotization".
As robots become more and more general-intelligent with cheap maintenance costs, creating their specific "inner robot market", they will drive the costs of many human labour/service forms even lower making many current human-oriented job obsolete.
Without egalitarian welfare solutions, such as basic income, we are very much fucked.