This is spot on. Not only that, but Turkey always had a tough time taking the final step into being a "true" representative democracy with similar characteristics to western democracies. From the seculars point of view, they was always worried of islamists taking over. From the nationalists point of view (who have had a lot of overlap with secularists historically), they were always afraid of kurds getting representation, which they saw as being separatist, and being secretly backed by foreign governments who benefit from division (kinda like Iran, Latin America, etc). In either case, whether you think it's justified or not, some groups got denied rights that would have been given in other countries.
Erdogan and AKP's political innovation (I think) was supporting a strong muslim-nationalist identity that consolidated support from both camps (thus denying them to the opposition) and created a very coherent story for why people should support him.
He also garnered a LOT of support from the international scene, especially western Europe and the US, when he got elected. It got hailed as a step forward for democracy, who willfully ignored and dismissed Erdogan's much more shady history. And, admittedly, Erdogan did start out as a right-of-center leader, which helped people suspend some hangups. He made a lot of changes that helped his base in the long run - easier access to stable government jobs, better public services, etc. Meanwhile, eventually, the secular camp's worries would be proven correct, of course, but in a slightly different way than they anticipated.
Re: MHP, it is mostly just grasping for relevance in an age where its voter base could just as easily go to AKP and CHP, which would reduce its overall support to less than 10% of the country, which would mean that they don't get seats in parliament (a law passed during the secular era to deny representation leftist / "communist" / kurdish / extremist groups, depending on who you ask).
---
edit re: whether "Islam" caused all this https://news.ycombinator.com/item?id=14131444