How would all the descendants of Elros die out?
Depending on when it would have happened, there could have been tens, hundreds, thousands, tens of thousands, etc., known descendants of Elros in Númenor. The Kingdom of Númenor lasted for about three thousand years, and even though Númenórean genrations were long, there should have been at least twenty Númenórean generations. If the descendants of Elros doubled in each generation, there would have been a million members of the 20th generation.
Well, maybe all the descendants of Elros in the male line, or even all the descendants of Elros including female line descendants, could gather in one building for some very special ceremony, such as the installation of a new king. And maybe an earthquake could knock the building down and crush them all to death.
If that was after the Númenórians began fighting Sauron in Middle-earth, Sauron might have found a way to cause a terrible, devastating earthquake in Númenor, and timing it to take out the entire dynasty at once might have been possible.
There are examples of thrones being peacefully inherited by people not descended from the first ruler.
The best European example that comes to mind is the Roman Empire. It was founded by Augustus, who intended from the first to make the leadership hereditary in his family, but the Julio-Claudian dynasty of his relatives and descendants ended with Nero in AD 68. There were surviving Roman aristocrats descended from the daughter of Augustus, and occasionally one of them would become emperor, usually for other reasons than descent from Augustus. The latest emperor claimed to be descended from Augustus was Gordian III who reigned from 238 to 244.
And of course some later emperors might have also been descended from Augustus without that fact being known now or maybe even during their reigns. But of course if nobody knew they were descended from Augustus that would not have been a factor in making them emperor.
So if the descendants of Elros died out in Númenor, the people of Númenor might have chosen a new dynasty, or chosen to make the position of king elective, or maybe they would have selected Elrond, the closest relative to Elros the first king, to be their king.
It is possible the Númenóreans might have selected Elrond to be the eternal king of Númenor, with the island actually governed in Elrond's name by a series of more temporary co-kings or maybe viceroys, Men and/or Elves selected by Elrond and/or the Númenóreans.