The magic words worked because they were backed by the power of institutions that people trust.
The mistake this guy made - the mistake that the US Republicans are absolutely not making - is that he did not sufficiently erode public faith in those institutions first.
He actually did have the backing of a lot of the military top brass. The problem is that the rank and file wouldn't back the brass in clearly violating lawful orders from the government. A big part of why those soldiers sent into parliament did such a shit job is because they obviously weren't even sure they were supposed to be there.
It honestly sounds too good to be true that you can be getting invaded by soldiers, and you can just say 'no' and they go away. That is the power of law.
On December 3, when President Yoon Suk Yeol of South Korea declared martial law, soldiers were deployed to the National Assembly, blocking access and creating chaos. Despite the military presence, some opposition politicians physically fought past soldiers and barricades to reach the emergency meeting. Their actions allowed an emergency session to take place, where 190 lawmakers voted unanimously to overturn the martial law order.