Is the problem in Barcelona that the ration of tourists to locals is broken (I agree it is and didn't like it there when I visited because of this) or is the problem affordability as called out by the parent comment? If the issue is affordability this can be addressed by increasing supply.
If the issue is simply too many tourists flooding the city and changing the character, it's a different point than I was responding to and I don't have any well-formed thoughts on potential solutions and causes.