I recently reread The Lord of the Rings and its appendices, and I find it hard to accept that Aragorn is the only surviving in the line of succession of Isildur or Anárion by the time of the War of the Ring. From a narrative standpoint, I understand this is what Tolkien intended, but if you take a logical view of the history of Middle-earth, it doesn’t seem to add up.
The heirs of Elendil ruled in Gondor until TA 2050 (with King Eärnur’s death), and in Arnor until TA 1975 (after the fall of Arthedain and the death of King Arvedui). After these events, the line of chieftains in the North began. Over this combined period of roughly 4,000 years, there would have been many opportunities for these royal lines to grow.
We have some idea of how long some of these kings ruled, but there's little information about how many children they had. Even assuming a conservative estimate of two children per king, there should have been thousands, perhaps tens of thousands, of potential heirs in existence by the time of the War of the Ring.
In Arnor, you could argue that many of Isildur’s descendants perished during the wars with the Witch-king of Angmar. While Tolkien never explicitly states this, it's a logical conclusion given the thorough destruction of Arnor. Therefore, it seems plausible that Aragorn could be the last remaining heir to have survived the fall of the various kingdoms of Arnor at the time of the War of the Ring if his ancestors, through the line of the chieftains, frequently died defending the North.
However, Gondor seems less likely to be devoid of heirs eligible for succession. Based on Gondor’s history and the fact that we know some kings had multiple children, it stands to reason that other cadet branches of the royal family likely existed. At the time of King Eärnur’s death, thousands of potential heirs eligible for succession could have existed.
Initially, I thought the lack of suitable heirs might be due to an emphasis on maintaining the purity of Númenórean blood, but Gondor’s royal line continued through Eldacar, whose mixed blood (Númenórean and Northman) sparked the Kin-strife. After Eldacar's eventual victory, his descendants continued to rule, suggesting that blood purity alone wasn’t the determining factor for kingship. While I know there is mention that many of the royal family died or joined the Corsairs at the time of the Kin-strife, there was still an additional 600 years between the Kin-strife and Eärnur's death, providing significant time for the ruling branch to grow.
If we consider the Great Plague in TA 1636 and restart the timeline of the potential line of succession from there, you could estimate there would be at least a few hundred potential heirs at the time of Eärnur's death, based on an assumption of two children per generation and accounting for some attrition due to war and plague.
So, while I understand that Tolkien’s narrative and storytelling center on Aragorn as the rightful king due to the line of succession and the only heir to survive, it seems improbable, given the long existence of the kingdoms, that no other suitable heirs existed from various cadet branches of the royal family who would have also been in the line of succession ahead of him, particularly as descendants from King Eldacar.
Is there a better in-universe explanation for why Aragorn was the only remaining heir in the line of succession?