Let's take a look at the Duke of Richmond (also Duke of Lennox and Duke of Gordon - although the latter only applies since the 6th Duke). Currently, there are 19 male-line male heirs descending from the 6th duke (so eligible to inherit all three dukedoms). Of which only the first three are direct descendants of the current (11th) duke; numbers 4 to 14 descend from the current duke's great-great-grandfater (7th duke); while 15 to 19 descend from the great-great-great-grandfather (6th duke). However, the numbers have varied a bit over time.
For the continuity of the dukedom it seems that the 4th duke (who himself was a nephew instead of a son of the holder) was really helpful as he had 6 sons. So, from that moment on the dukedom was much less likely to go extinct... And more recently, the 7th duke having 3 sons with male-line descendants makes a difference.
First duke: 1 heir (son) at the time of his death
Second duke: 2 heirs (sons) at the time of his death
Third duke: 7 heirs (his nephew and the nephew's 6 sons - out of 14 children) at the time of his death
Fourth duke: 6 heirs (5 sons + 1 grandson) at the time of his death
Fifth duke: about 17 heirs (4 sons (a fifth passed away before him), 3 grandsons by his eldest son, 3 brothers, 7 nephews)
Sixth duke: at least 10 heirs (4 sons, 4 grandsons, 2 or 3 great-grandsons, and surely several cousins - I couldn't find the years of birth/deaths of his cousins (that were included in the '7 nephews above and whether they had children)
Seventh duke: at least 7 heirs (2 sons, 4 grandsons, 1 nephew)
Eight duke: at least 8 heirs (1 son (the third and youngest; the elder two sons either died in childhood or in war), 2 grandsons, 1 brother, 3 nephews, 1 great-nephew)
Ninth duke: at least 14 heirs (2 sons, 2 grandsons, 3 first cousins-once-removed,
4 first coursins-twice removed, 1 second cousin, 2 second cousins-once-removed)
Tenth duke: at least 22 heirs (1 son, 3 grandsons (by the son's second wife - I wonder whether the 'need' for male-off spring played a role in their divorce), 1 nephew, 3 second cousins-once removed, 4 second cousins-twice-removed, 5 second cousins-thrice-removed, 1 third cousin, 2 third cousins-twice-removed, 2 third cousins-thrice removed)