Do you have any citations for that? Perhaps it differs by city and region, but many modern cities with good sanitation systems are exceptionally clean - you're not getting frequently reinfected by others' gut flora unless there is a catastrophic problem with the sewer system. People with things like C. difficile infection can have chronic disease for years, and fecal transplants have only recently been recognized as a good treatment in those cases - point being you have to have an actual fecal transplant, you're not just going to "get reinfected with healthy microbiome from sharing germs with all the other humans".
It would be interest to see how historically contact with X other people has changed over time. I don’t think you need a big city to mix with a lot of people. I imagine in older times there are fewer people but likely to be closer to each other - people sharing beds (not stupidly associating bed with sex) and tribes of families mingling close lower instead of nuclear family. By contrast the city apartment is the hermetic seal around a small number of people choosing to live together. But a modern concept: corporations, jobs and careers ensure people keep mixing up with people outside.
We both have our appendix.
Though to your point, whether you can develop a milk allergy later in life I am not sure.
[0]: https://en.wikipedia.org/wiki/Appendix_(anatomy)#/media/File...