What I usually do:
- Try to imprison leaders of plots, since people in prison cannot join a faction
- Have lower amount of direct vassals and appease your most powerful ones(titles, give them land, gifts etc.)
- Excommunicate ambitious vassals and imprison them
- Elective succession and pick an heir that has (Kind, Just, Brave, Gregarious)
- Have a decent personal army size so factions are not as intimidating
I thought about sending all my male children to serve the church, but thats only when my dynasty is well populated with cousins that have no claims to the throne. Otherwise I want them to make more babies! And grandchildren will get claims anyways so no point.