Turns out almost everybody who was a citizen was born somewhere else. Further, life spans were short, so most of the people weren't even citizens so it wasn't a big issue ~ the Doge was elected for life anyway.
The city had few children ~ the maternal death rate was nearly 100%. Wealthy people would make sure their pregnant women were out in villages, and the children would be raised by peasants in a healthy atmosphere.
Venice, for most of 7 centuries, was the best place to live in all of Europe!
My grandparents sent my mother and her siblings to my maternal great-grandparents’ farm each summer. They did this to avoid polio, primarily, but the other childhood diseases like diptheria, mumps, measles and pertussis could also take the life of a little child. And, these folks didn’t live in a particularly large city of the time.