As Machiavelli demonstrated, a state which wants to become an empire needs to import many people.
These republics which want to remain free and stable for a long time should emulate Sparta or Venice, but they have to forego the hegemony and imperial glory.
See
The Beginning of Machiavelli's Rome's