Hitler was democratically elected. He still organized and orchestrated a coup d’état.
Putin was democratically elected. In related news, religious minorities are now labeled as terrorist organizations in Russia, homosexuals are beaten, tortured and killed by angry mobs at the incitement and patronage of the Russian state and peaceful protests are met with mass arrests.
All you have to do to get elected is dupe an angry subset of the population into voting against their own interest just to spite the “Liberal Elites”. You do that by trickling hate into every news segment, bombarding their social media with false information, putting them against those that are weaker than them and feeding into their appetite to just watch it all burn. You know what I’m talking about here. Getting elected is the easy part. Remaining in power indefinitely requires a coup, but a coup requires preparation of the system. You need to hollow out the various branches of government to the point where they can no longer perform their function. You strip the judiciary of its power, full the ranks with loyals and create a propaganda arm to disseminate false information to suit your needs. Check, check and check.