If urban city shops and restaurants have had regularly rotating staff for decades then loss of those touchpoints can't have much difference to do with the claimed decline in mental health of the last couple of generations as suggested upthread though.
(A few hundred years back cities were mostly only the size of small towns today anyway, the average person didn't really frequent stores and rural communities were sometimes really isolated, and we don't really have an accurate picture of how any of this affected mental health)
i live in a city with a population of 14 million people, but still most of my everyday transactional interactions like buying churros, chicken wings, or electrical supplies are with people i know and transact with repeatedly. that's because i walk there, lacking a motor vehicle. i imagine this was also true of day-to-day commerce in ancient rome, and of course the patron-client and master-slave relationships that were so central in roman society were anything but anonymous
I agree: I live on and off in a city of many, many millions. Maybe it’s just the idiosyncrasy of how I choose to live and shop, but I personally know most of the people with whom I transact regularly in the same way you describe.
Including many of the specific humans who staff the handful of Anonymous Big Chain kinds of enterprises that have weaseled their way into our city: even one of those branches tends to have familiar faces managing or preferring to work the shift that overlaps with when I visit.
I would know how to seek social and transactional anonymity if I wanted to—just go do my shop in a different neighborhood!—but I don’t want to, and that seems pretty consistent with the way things are done in my city.
So even a cursory reading of older books and novels that detail city life just a few hundred years ago shows this not to be the case.
What's gone on is that the phenomenon described above has started in cities and spread everywhere, for better or worse.