There have been societies that functioned for a long time, thousands of years. They had sustainable demographic patterns. That means that they had enough children to replace themselves – not necessarily in every generation, but over the long haul. But sustainability requires more than that. Long-lived civilizations [ones with cities, literacy, governments, and all that] had a pattern of natural selection that didn’t drastically decrease intelligence – in some cases, one that favored it, at least in some subgroups. There was also ongoing selection against mutational accumulation – which meant that individuals with more genetic load than than average were significantly less likely to survive and reproduce. Basically, this happened through high child mortality, and in some cases by lower fitness in lower socioeconomic classes [starvation]. There was nothing fun about it.
Modern industrialized societies are failing on all three counts. Every population that can make a decent cuckoo clock has below-replacement fertility. The demographic pattern also selects against intelligence, something like one IQ point a generation. And, even if people at every level of intelligence had the same number of children, so that there was no selection against IQ, we would still be getting more and messed up, because there’s not enough selection going on to counter ongoing mutations.
It is possible that some country, or countries, will change in a way that avoids civilizational collapse. I doubt if this will happen by voluntary action. Some sort of technological solution might also arise – but it has to be soon.