It doesn't work like that. Your influence needs to be raised in order to prevent defections.
You're influence is higher with researched techs/abilities, more population, owned planet density in a given area, Influence Mines and being within the range of Influence Stabases with Influence Modules added.
You can also prevent defection by building a re-education center. It works only for the planet that it's built on and you can only build one.