> However there needs to be a stable society to host the researchers (using the term loosely to include people who invent stuff).
I agree with you insofar that if people are living hand-to-mouth it's very hard to achieve scientific progress just because there is not enough time.
In general however this does not require a stable society, just that there are people within the society who have time to think and the resources to test their ideas. We've seen this in the past when 'rich' people sponsor someone to do 'science' even though in general the population is living hand-to-mouth, and we've seen it recently in Europe where science continued even though the land was being torn up by war.
That said, for large scale, wide spread advancement you obviously want more people able to contribute, so a stable society definitely helps with this.
> That is possible with extreme ethnic homogeneity, possible with strong shared religion and culture and possible with conducive economic conditions where everyone benefits from pulling together.
I agree that these things can lead to a stable society, with the correction "religion or culture", but actually think there is something more fundamental going on.
> It isn't obvious that 'science' can fill that role if it displaces religion and we go through 20 years of hard times. A cynic's read of science would support the idea that we stab the neighbor when the going gets tough.
First of all, it's not necessary for 'science' to fill this role, culture is already a fine fit. Indeed, the cases you probably think of when saying religion can form a stable society are better explained with culture (of which religion or religious observances may be a part), especially when we consider the many conflicts in history between groups of people who claim the same religion but have different culture.
Furthermore, 'science' doesn't say anything like "stab your neighbour when the going gets tough". One of the prevailing theories around the question of "why do we cooperate" is that cooperating is more economical, and societies that cooperate are more likely to survive. It is a self selecting trait of successful societies. Individuals within a society may choose to act in uncooperative ways, but even if I thought I could improve my lot in life by stealing from my neighbours, I'm able to recognise that if everyone acted like that it would be bad for me personally. Culture and law - cultural memes, these are the elements of a society that lead to it being stable.
> Eugenics, for example, was once considered the scientific option until WWII happened, there was a lot of interest in the early statistical community in that sort of thing. Some bits worked, some didn't, but the experience doesn't paint 'the scientific approach' as beyond moral question - there was lot of suffering and some very divisive ideas came to fruition.
There are not many people who believe any human endeavour is beyond moral question, but especially not science! Insofar as we can call 'science' the modern organised research institutions, we have entire systems set in place exactly because we (humanity) believe that some things are not worth knowing if you can't discover them without human suffering, or 'not immorally' for whatever we find immoral.
That is to say, 'science' doesn't dictate how we structure our lives or behave ourselves, we do. The institutions we build and the cultures that persist are what lead to stable societies, but it's much easier to make good decisions when you have more knowledge.