I think you're right, that could be deterrence. However, if you're at the point where nearly all of your head of state's security forces are compromised, you're at a point where you could probably compromise the nuclear operators too.
My main point is that technological systems and powerful weapons do not automatically overcome or safeguard the human element.
Edit: Maduro would still be in Venezuela if the human element in his security were strong, even without nukes. And he might be in a US dungeon if the human element were weak, even if he had nukes.