Like any other place, NK is not NK is not NK.
You have the interests of the regime - what they gain is that they keep on being boss, or at the right hand of the boss.
And then you have the interests of the next layer below, who would implement whatever threats are made by the top. They lead the military and operate whatever strategic weapons the regime has. And who AFAIK are held to their obedience through fear - for both their lives and their relative status, and despair of being rid of the leadership.
And the next layer below is held down by general fear, misery and despair.
The critical part is the loyalty of the second layer, the manager and expert class. Its their rationality that is at issue.
The nukes are there to protect the layer on top, and act as blackmail for foreign subsidies, as usual for NK since 1991.
The same is true to some extant in China: it's not clear to me that Xi has full control over the PLA.