Talking down like that to locals really fans the flames of the latter solution. Probably not good to do it.
If you live in a nice city (and Barcelona is a great city, truly a world's treasure), it attracts tourists, by definition. I don't think anything can be done about that (except maybe ban AirBnB and introduce hotel tax -- but they will just live in places nearby and drive in by cars). You can also of course make your city less nice (by riots, crime, graffiti, trash, whatever), but this is shooting oneself in a foot.
The "problem" has no solution. Great cities are attractive, people want to go there, and have the legal right to.
Locals can do things to regulate tourism by economic means, but you can't say "don't come", except on state level. The city is not your property.
Other cities would require a wall.
No they wouldn't. Just higher fees on hotel rooms or congestions charges for cars. It's possible to reduce the numbers visiting any city.
The same logic should also work for states; people, however, are irrational in this regard.
If a city feels its culture or inhabitants quality of life is being adversely affected by tourism then it is fine to control the numbers.
If you look at places like Venice part of the criticism was the hordes of people arriving that don't spend any money. They bring packed lunches and just clog the place up. There are plenty of products and services that manage demand by increasing prices, I can't see why these places should be any different.
Luckily it is feasible.