The real deterrent for an all-out nuclear war is that there are no winners. Nobody will come out on the other end with more land, or more money, or more oil, or more prestige. it's all gone.
In what way is this a deterrent to a suicidal religious fanatic in control of weapons, or one who works out how to hack the nuclear arsenal of a nuclear power? Or to a secular dictator whose back is against the wall with nothing personally left to lose?
Most rational people in almost all situations would of course never use nuclear weapons. Unfortunatley this does not cover all people or all situations. It's a waiting game.
If you think nuclear war is highly unlikely, surely the historical examples when we came very close should cause some pause for thought. Like the Russian nuclear submarine under fire during the Cuban missile crisis, when two out of the three Russian generals wanted to respond with nuclear weapons. Or the various false alarms that were only recognised at various late stages. Or the war between India and Pakistan that could easily have escalated.