So what I'm basically asking here is - are mass suicides a relatively new thing in our history? Particularly religious ones here, but outside of that can be relevant too.
At least in my area of expertise I'm not really aware of much in this front in al-Andalus besides the occasional persecuted group who were called martyrs later, but those were executed people, not suicides, and they weren't really mass scale.
So have mass suicides occurred much in history before the past, say, 150 years or so? I'm particularly interested in stuff before the modern era (in the historical sense) but if you have anything from say the 18th century that could be interesting too.
Famously, there was a mass suicide at Masada during the a revolt in 1st century Judea. Like Jonestown, in some ways, this was when opponents were closing in and the community was set to end. The people at Masada expect execution and slavery, the leaders of Jonestown expected imprisonment (for the elites at least) and the end of their community. Not too dissimilar things happened in North India during the Muslim conquest, though here it interestingly only (or at least primarily) involved women. I can point to dozens or more similar incidents going back deep into history. Likely, these sort of mass suicides date back even into pre-history.
So the case of Jonestown/the People's Temple isn't that strange in historical context. It's a rare event, and a deeply tragic one, but not an unprecedented one for a tight knit community, especially a religiously motivated community, to choose suicide over conquest and (perceived) defilement. Wikipedia even has a list of mass suicides, and all of them up until the 1990's follow that pattern: suicide over surrender, death over defilement.
However, the Order of the Solar Temple and Heaven's Gate are different examples entirely, in my book. The groups were under no existential outside threat, and voluntarily chose to die in order to engender some sort of transcendence. In those two cases, the group thought they'd move to some extraterrestrial actually existing plane (the two groups are usually classified as "UFO religions"), but there are other recent cases where the transcendence is less literal^1 , I believe, and of a more general apocalyptic bent, rather than tied up with UFO and alien worlds specifically.
While human sacrifice as a means of transcendence is a very, very old idea, where often times both the sacrificed and sacrificed gained special access to transcendent power, I can't think of pre-modern cases (indeed, pre-Solar Temple cases) of cases where large portions of a group, or in the case of Heaven's Gate almost all of the group, committed suicide (effectively sacrificed their earthly existence) for transcendence en masse without any impending earthly threat to their existence. There may exist some (the world's a big place, and history is long), I would guess especially in areas where human sacrifice was already in the religious repertoire, but I simply can't think of any. It's possible this is a largely new type of religious act.
Note 1: By less literal, I mean they think they'll be "reborn pure" in heaven or some such place, rather than shed their earthly bodies and be transported to physically existent Sirius (Solar Temple) or a literal spaceship trailing a comet (Heaven's Gate).