at what point is it legitimate for one figure to turn himself and his family in near demigods in order to take hold of a nation struggling against an invading foreign power
Is that what happened? Where did you get that information from? Was it from your direct experience living in North Korea? Perhaps you've read primary source materials written by North Koreans either inside North Korea or living in China or Russia? Because if what you're telling me is that you believe this because the people that attacked Korea tell you it's true, then I have to admit I don't think you've got a firm enough grip on the situation to say that.
But even worse is that you don't know what you're comparing against. You're comparing against the idealized "non-authoritarian" state of white middle class America and Western Europe. The better comparison would be South Korea. And South Korea was under a brutal totalitarian dictatorship for over 60% of the time that North Korea was, and South Korea is STILL an active US military base that runs regular simulations of literally invading North Korea with all of the materiel and soldiers needed to repeat history.
The Kims didn't take hold of a struggling nation, they were literally leading a cadre of the people's army. They were instrumental in the struggle for national liberation and then in the struggle for their survival against the genocidal Americans and then they were instrumental in the rebuilding of Korea and the securing of Korea against the dictatorship to the South that was hosting the brutal global war machine of the Americans.
Did the state use a cult of personality as part of their system of control? Absolutely. And we think it's weird because we don't think we do that. And yet, we teach all of our children that George Washington was a brave and noble fighter for the rights of people but never teach that he made his dentures by ripping teeth from the heads of his slaves. We teach all of our children that Thomas Jefferson was a leading architect of this great document to enshrine liberty for all men but we never teach that he ran literal rape farms, committed infanticide, raped his slaves as young as he could, and even kept a girl inside a sex hole in his bedroom, and even wanted to ban the transatlantic slave trade so this his "domestically produced" slaves would fetch higher prices. You are not immune from the charge of believing fanciful lies about people who committed acts of mass barbarism that not only do we still celebrate but literally have printed on the money we use every single day.
So at what point do we decide that the DPRK's particular brand of personality cult delegitimizes them as a state? I would say only when you'd be willing to say that the US is an illegitimate that doesn't deserve a standing army to protect itself.
proceed to establish a totalitarian authoritarian regime that lasts to this day and whose acts of violence and brutal control onto the people are very well documented?
Well, let's see. The per-capita incarceration rate in the DRPK is estimated to be about the same as it is in the US. That's an estimate because of course we have no documentation about it, and the estimate comes from satellite imagery, the testimony of exiles working with the West, and the standard magic pixie dust that Western NGOs use to make anti-Western state into a pariah. But even in thew worst estimates, the DPRK is only slightly worse than the US on prison rates, but the US has 2x as many people on parole as they do in prison, and parole is literally a condition of being actively monitored by police, often having your wages garnished by the state, etc.
I'm not aware of documented evidence of violent acts of control against the population by the DPRK. I'm aware of violent acts against prisoners, and they're bad, but I'm not aware of the DPRK, for example, killing hundreds of people every year in police altercations, police riots beating hundreds or thousands of people, national guards firing into crowds of students, or bombing civilian fishing boats.
The DPRK established a state under siege. I don't know if you've ever read through the history of sieges, but the point of a siege is to make the people in the city so desperate for food, water, medicine, and peace that they're willing to kill their own leader and open the gates to the invading army. Under those conditions, the besieged state is managing violent threats from both the outside barbarians and its own people who crack under the pressure. Failure to neutralize the internal threat from the small percentage that would throw wide gates means the external threat comes in full force and kills the rest of your people. Is that kind and fair and just? No. Is that because the DPRK is a bad faith actor? No. It's because the US literally decimated their population, poisoned their land, and then tried to starve them through a 70-year siege.
It was obviously a wrong thing to do but who had the means to oppose it? And the will, after a long war? Even more with the nuclear menace looming?
So you're fine with saying that the US were barbaric genocidal maniacs and nuclear menaces with all of the power and the will to fight while everyone else in the world was really just seeking peace but you still think that the DPRK is the bad faith actor here?
Maybe talking it out will help you see the contradiction in your position. The US's actions during and after WW2 are not irrelevant history that's in the past that people should be able to just overcome now. It's quite literally the living present and it informs every single conflict over the last 70 years.
Do you think The Taliban exist because Afghanistan just breeds backwards people? Do you think al-Qaeda exists because Islam is a bad religion? Do you think Kuwait exists because it's a genuine nation-state that deserves autonomy? Do you think Iran has absolutely no reason to have a brutal repressive administration despite it being literally the only way it has been able to maintain its autonomy from the West over the last 200 years?
The DPRK is an incredible story of resistance, a literal beacon of hope in an otherwise dystopian doom spiral. They fought for their independence with a people's army and were so thoroughly destroyed that by all rights they should have been defeated and dissolved, but instead they not only held their ground but they rebuilt their country from literal rubble to a modern state complete with indigenous food production, medicine, education, recreation, and a national defense strategy that has prevented any meddling from the West via overt or covert means, and very very few nations in the world can make that claim. And they did while only having 2 trading partners: China (who was literally the poorest country in the world for most of that time) and the USSR (who was also under total blockage by the US).
The Koreans in the North have, almost without peer, the most legitimate claim in the whole world to self defense and national integrity.