Not at all. The modal kid never encountered a stranger. If you did meet one, not talking to him was an instinct followed by children and adults alike.
Even 8000 years ago human beings were not so distributed that they never encountered strangers. There were a few proto-cities back then with ~1,000+ people, which is enough for strangers on a regular basis.
And then as now, the urban population was not even reproducing at replacement level. The population of first-century Rome left zero genetic impact on Italy.
It was less of a problem then than now, since the urban population of the distant past was a negligible percentage of the total, whereas for us it's the majority.
A million people left no genetic impact? Are you sure about that? Seems too far fetched even for an exaggeration.
From a genetic perspective, cities are just somewhere you go to die.
Better life lessons learnt than many other stories on TV.
Besides, there comes a time in most kids lives there they move from fairy tales to adult movies, during the time their brains are still very plastic.