Can anyone recommend some resources, or provide actual examples, of any relevant evolutionary-biology-style equations which could describe what factors would most likely predominate to allow for the survival of sapience, given such factors as the ease which any given individual can acquire the means of killing large numbers of people, the scale of those means, the willingness o people to use those means, the ability of small groups to travel away from other groups, and so on?
Or, put another way - is there any way I can quantitatively check my intuition that a valuable way to avoid certain existential risks is to flee Earth?
No, more expensive than Mars habitats, for the reasons you mentioned. When I said "and easier to terraform," I meant that as a bonus, not as a requirement. Closed habitats seem like a reasonable norm for small societies in hostile conditions.
Sure; but there must also be dependent chances (like gamma ray bursts or ubiquitous design faults or so on). It seems difficult to have the baseline dependent fragility of orbital habitats at lower than the baseline dependent fragility of Earth. I would rather have 10 Cheyenne Mountain-style habitats a bit below the Earth's surface than 10 orbital habitats- and, again, at equal cost expect to have a lot more ones on Earth than off it.
Ten Cheyenne Mountains are fine—as long as nothing happens to the Earth that would stop the people surviving in them from resuming agriculture on the Earth's surface (whether or not under glass). I'd like there to be humans elsewhere in the solar system that are already growing their own food as a hedge against any of the things, already thought of or not, that can take out a planet but not a solar system.