Much like Orbán in Hungary, there's a veneer of democracy in Türkiye that Erdoğan still needs to deal with. It's why he's making stupid promises about re-housing everyone within a year. These soft dictatorships win elections by controlling the message via state media, jailing the opposition (if they appear to be too much of a threat) and handing out goodies left and right. Fragmenting the opposition is more important than imprisoning them. Neither country is a single party dictatorship; it's just that AK and Fidesz have all the ingrained advantages.
Pinochet in Chile and the military dictatorship in Brazil both lost power via the ballot box - in Brazil to the "Diretas Já" (direct elections now) movement, and in Chile via a plebiscite that Pinochet lost by 11 points. Both occurred because the opposition coalesced against leaders that thought their systematic advantages would hold as they had in other elections. While Erdoğan still has those advantages, enraging his own supporters may well cost him. Perhaps not, but it is still possible (it is also possible, as you say, that it will take a coup - but this tragedy makes that more likely as well).