That might be true to some extent but I think it ignores all of the other much more powerful motivations. Wealth is easier to accumulate in a city because there is far more specialization.
I can't be a first-rate baker and a blacksmith and a shipwright and a miner and a fisher and a farmer and and and ... the specialists in the city do one thing excellently: they bring down the cost while also bringing up quality, raising quality-of-life for people in the city. If I'm an average farmer and average blacksmith, perhaps I'll produce $10 worth of goods in an hour, $5 worth of crops and $5 worth of tools. As an exceptional farmer, I can produce $20 worth of crops, trade $10 of them for tools, and end up with $10 each of crops and tools. It's as simple as that - trading between people with different specialties / needs leaves both people better off, and you can't do that subsistence farming.
Public infrastructure in cities has also always been much better, such as roads, communication systems, police, fire fighting, etc. Trade was much easier because there were more people to trade with, a larger market for your goods. On a small subsistence farm, any excess that you cannot save or reinvest is wasted; in a city, it can be sold or traded to accumulate wealth.
There are certainly people who are attracted to the city because they can't hack it (beggars, etc.), but they are in the minority. In the modern era, something like 3% of the population are farmers, and they are so exceptionally effective (supported by agricultural scientists, robotics engineers who build automated farming machinery, etc.) that the rest of us have plenty of food, freeing us up to specialize in other things (like robotics).
I believe this cycle of technological enrichment fundamentally requires specialization. This is not to say that anyone is wrong for wanting a simpler or more communal form of living, but I doubt the motivations are anything economic. The reason that so many people end up working in cities, in factories (sweatshops) today is simple: they can accumulate more wealth specializing in even a mundane repetitive task (quickly, cheaply, and with quality) than they could by subsistence farming.