I worked up an event based on the feudalistic notion of escheat--that ruling families who die out have their lands revert back to their liege. The trigger is on_new_monarch, being a subject nation, and crowning an heir with less than average incoming legitimacy. Let me know what you think.
What you need to do: The trick is to add the event number to the on_new_monarch entry in on_actions.txt in your \common folder. I have been using it in my EAF game, and it works historically for the HRE above all, though of course there could be game balance issues, given the difficulty of HTTT monarchs to produce legitimate heirs... 
Code:
country_event = {
id = 11900
is_triggered_only = yes
trigger = {
is_subject = yes
government = monarchy
NOT = { legitimacy = 50 }
}
title = "EVTNAME11900"
desc = "EVTDESC11900"
option = {
name = "EVTOPTA11900"
ai_chance = { factor = 100 }
overlord = {
country_event = 11901
}
}
option = {
name = "EVTOPTB11900"
ai_chance = { factor = 0 }
stability = 1
}
}
country_event = {
id = 11901
is_triggered_only = yes
title = "EVTNAME11901"
desc = "EVTDESC11901"
option = { #Keep it for ourselves
name = "EVTOPTA11901"
ai_chance = { factor = 30 }
inherit = THIS
limit = { is_emperor = yes }
add_imperial_influence = 5
}
option = { #Let the new dynasty keep the fief
name = "EVTOPTB11901"
ai_chance = { factor = 40 }
prestige = 5.0
relation = { who = THIS value = 100 }
}
}
Now for the localisation:
Code:
EVTNAME11900;Escheat;;;;;;;;;;;;;x
EVTDESC11900;With the expiration of our dynastic line, the Emperor demands that we return our ancestral lands to the imperial demesne;;;;;;;;;;;;;x
EVTOPTA11900;Fine. We have no choice;;;;;;;;;;;;;x
EVTOPTB11900;I fought my way to this throne!;;;;;;;;;;;;;x
EVTNAME11901;Our Right of Escheat;;;;;;;;;;;;;x
EVTDESC11901;Our vassal, the Lord of $FROMCOUNTRY$, died intestate. His chancellor has returned his land to the imperial demesne;;;;;;;;;;;;;x
EVTOPTA11901;Good to know;;;;;;;;;;;;;x
EVTOPTB11901;Let them keep this worthless piece of land;;;;;;;;;;;;;x