Some ways this was handled historically
Marry the families
In medieval world, the blood ties were really important. By marrying into them or them into your family, you could get strong bonds that reduce the chance of them rebelling against their kin. This was not uncommon to do in back in the day. The emperor could marry a daughter or cousin to each family, for example, or take some of their female members to marry to males of the empire dynasty. This can by itself is not a bad thing but usually it additionally seals a pact between the two families to help each other.
The downsides starts with giving a family a potential claim to the empire. While marrying would normally pacify an enemy, it could backfire and incite them into action to try and grab the throne. This is also quite common in the medieval times. It can be a potent hook for a story if needed or an element to be removed if unsuited - perhaps in your world people value family ties even more.
Another downside is incest and inbreeding - the two families have incentive to keep marrying into each other, so perhaps the daughter of the emperor has a child which is married to the emperor's son's child. Again, common in the medieval world to marry cousins. Over several generations this can lead to your version of the infamous Hapsburgs.
Take hostages
This sounds way more dramatic that it actually was but it was still a common practice in the medieval days. When we talk about "hostages" it's not usually somebody locked in a dungeon or tower - they were more like honoured guests. In fact, children could be sent to the capital (and this the emperor) to get a better education which the emperor would see to. However, as it happens if the child's family rises up, then the emperor still has the child at his mercy. If your firstborn son, or even all your male descendants were in the capital, that could be a very compelling reason not to threaten the emperor.
However, as I said, it's not just threats - being in the emperor's favour is a good thing - your children get education they probably can't get anywhere else. And included in the package is knowledge of how the empire operates, first name basis with the current or even future emperor and key figures in the administration. That gives you, as an underling, a very good way to get things from the empire - money, troops, favours. After all, your child can speak on your behalf to exactly the people who can arrange that. When your child succeeds you, they have a very close tie with the administration that they can still use to help the family.
All in all, a "hostage" isn't a bad deal and was rightfully used in the past. It could even be used between different states - they would regularly exchange hostages with each other to ensure peace and further help out diplomacy. After all, if your neighbour's kid grows to know your culture and you personally, they are less likely to harbour enmity.
However, this can also backfire Tsar Simeon I of Bulgaria was educated in the court of the neighboring Byzantine Empire (East Roman Empire) but used his knowledge of how the empire operates to start a war against them. Interesting to note Simeon negotiated being given the Roman (Byzantine) title of "caesar" after the war. The slavonic way to pronounce it resulted in the title "tsar" (alternatively spelled "tzar" or "czar" but its different transliterations of the same root). So, in effect Simeon became an emperor. His grand goal was to become the ruler of both Bulgarians and Romans (Byzantines) but ultimately didn't achieve that. However, being recognised as caesar was the road to that. Just reinforces how the "hostage" solution could be used against an empire.
"Bribes"
People can be loyal but loyalty can be bought. The emperor could pay..."extra" to key personnel to be loyal. That doesn't mean pay the families - if the emperor pays the generals under the families, then the family doesn't have much leverage to lead a rebellion. Although diverting some cash their way can also keep them satisfied. At any rate, the idea is to keep administrators and generals happy with the emperor, so they wouldn't just turn sides. Even if somebody gets the throne, that doesn't mean everybody underneath them would support them, after all. It's probably in the best interest of individuals to support the new emperor but then again they could just want the old one back. And cash is a good incentive.
Another incentive is the two points from before - give the most prominent generals brides from the imperial bloodline and/or take and educate their kids in addition to cash and they can be quite invested in the well-being of the empire's bloodline and position. After all, their own position now depends on it - a new emperor can mean that they are not kin with the top dog any more.
Generals are the obvious choice but don't forget the other administrators. Tax collectors would be vital to the empire's prosperity. Don't think about some intimidating guy from an office coming to steal the poor peasent's income - think of a guy who knows the locals and their plights. The locals already know and trust him, they also supply whatever tribute (probably coin, but could also be goods - depends on the setting) that goes to the empire. Without that guy, you'd have the former - a government agent trying to shake the locals for their earnings. This is way less effective and a good way towards a rebellion. A decent empire would recognise that preferring the latter. So, keeping the local tax collectors and other administrators complacent is preferable.
Speaking of the Byzantine empire, giving "gifts" to various key figures was a regular thing. They were pretty much bribes but more official as in, given out officially by the emperor. Annually (usually), there would be an event at the capital where powerful and influential people from across the empire would gather and would be given literal sacks of gold - dressed up as being "for accomplishments". It also served establishing and maintaining ties between the emperor and these people.
By this point, you may think "can this backfire?". The answer is that yes, it can. So, in the theme of the Byzantine empire, on the extreme end of "pay for loyalty" we have the Varangian guard - Norse who were were the paid bodyguards of the emperor. They were utterly loyal...to the emperor. Which led to a somewhat famous example when there was a coup against the current emperor and the Varangians "switched sides" supporting the usurper. They were loyal to the one who pays them and supporting the "loser" doesn't pay, after all.
On the other end we have the eastern part of the empire. Administratively called "Armeniacon" it's present day eastern Turkey and parts of its neighbors. The territory was quite hard to control for many reasons but it all boiled down to the emperor needing to be in the really good graces of the Armeniacon leader. Yes, that is the correct phrasing here - the core of the problem is that were Armeniacon to "defect" and join the empire's eastern neighbors that takes a huge chunk of territory and thus tax and troops away. The nature of the terrain is that it's really hard to attack directly, so winning the territory back would be very hard. Marriages, bribes and favours liberally flowed to the current leader there to keep them in line. Which also meant that the Armeniacon leader would have a lot of political power. Having their support could spell the doom of one emperor and the rise of another.