Generally it is best to manage factions by giving out gold and making sure you negative modifiers are not too high (tax/crown authority/traits). Also, if you are the de jure ruler of the empire/kingdom that the vassal belongs to, you get a hidden bonus that reduces the chance of independence attempts (like 15% I think). Generally, I don't give out Kingdoms to vassals who are outside of my Empire's de jure boundaries as doing so increases the chance of independence movements. Also, I know some disagree, but I prefer to keep all the King titles with myself. Kings make powerful opponents when they rebel. Granted, the counterargument is that it is easier to manage fewer vassals, but I like to keep my vassals weak.
Also, the depression trait once you have a good successor picked out is awesome. Everytime I get it, I pause the game, check for powerful vassals, arrest a few of them and then revoke their extra titles. After this, I just go ahead and kill my character (gamey, I know, but after 250 hours playing the game, I take some shortcuts at times) and my heir has none of the negatives and much less powerful vassals to contend with. Make sure to revoke titles after the arrest or you could end up with a huge negative opinion modifier and a revolt. Deal with any vassals that escape arrest after the suicide as that will reduce the chance of other revolts due to the huge tyrant opinion modifier.
As far as vassal management, give gifts to vassals right around any succession. It is always nice to have some gold handy. In fact, as an emperor you should have 2k+ gold in the bank when possible as it lets you mass gift your vassals when needed (e.g. right after succession). It also allows you to buy mercs in case of emergency situations. With a well built economy, you can be getting 100+ (or even 200-300 or more) gold a month, so stock piling some gold won't be too hard.
The spymaster is helpful at dissuading vassals from joining factions or even killing off vassals who are troublesome (e.g. ambitious trait). Even ambitious vassals are generally manageable with a good gift though as long as they are within your de jure territory and of the same culture/religion as you. Always make sure you make every vassal of yours of the same religion and culture. The penalties for foreign religion and culture hurts. This also means it is generally better to take territories a few at a time rather than taking over an entire Kingdom at once as doing so makes it hard to deal with the culture/religion penalties. If possible, have your new vassals' kids educated by you or those with your same culture/religion as this will allow a bloodless transferance of religion and culture of the next set of leaders (if you do a marriage based takeover for example).
Summary:
1. Gift vassals
2. Set crown authority/tax combos to prevent too much of a negative modifier (high/large tax is about as high a combo as you should ever go if you have great traits)
3. Educate your kids and give them good traits (humble, patient, charitable, etc) as they give nice opinion boosts.
4. Don't give out kingdoms outside your de jure empire if at all possible. Or better yet, avoid giving out Kingdoms (this latter part is just my opinion).
5. The spymaster can help you manage vassals. Use his abilities to help assassinate or dissuade vassals when factions are a problem. Otherwise, study opponent tech.
6. Depression on an Emperor with an heir is great. It allows you to piss off vassals by revoking titles, reallocate power, kill yourself, and start off with a fresh slate of opinion (avoid doing this when new to the game as its a bit gamey, but so are many things some of us do after multiple plays).
Good luck!