It annoys me how you lose your heir and you have no one else. You don't have other children? Brothers?
Having said that, I think this is very hard to model. You either have to go all out like CKII or keep EUIII system. Because monarchs don't have to marry just those from ruling royal families.
I'm sure it could be more realistic than EU3 without a full family tree. The game could work out the relationship of a new heir and thus the strength of their claim as well as their age based on the age and gender of the ruler and previous heir.
Take the situation of a 40 year old ruler whose 20 year old son and heir had just died. The game could work out:
25% chance - new heir is a grandson of the ruler between 0 and 3 years old.
20% chance - new heir is a granddaughter of the ruler between 0 and 3 years old (% lower because sons take precedence).
20% chance - new heir is a son of the ruler between 0 and 19 years old (an older one would have been the previous heir).
10% chance - new heir is a daughter of the ruler between 0 and 23 years old (she could be older than the son).
10% chance - new heir is a brother of the ruler aged between the number of years the current ruler's been on the throne and 39.
3% chance - new heir is a more distant male relative of fairly random age.
2% chance - new heir is a more distant female relative of fairly random age.
5% chance - heir is a member of a new dynasty but is acknowledged as rightful by the majority of the realm and the wider world.
5% chance - no clear legal heir: succession crisis.
The percentages are off the top of my head so may be unrealistic, but just having a relationship and plausible age would make it feel much more immersive.