To do this question justice is difficult, because where do I start? It is a complicated question if you are trying to answer without bias.
I'm a Liberal so in general not a fan, but the guy is also not the villain he is made out to be in the west . nethertheless I will start with the bad and try to link somethings together and give context:
Turkey has one of the lowest press freedom ratings in the developed/developing world. A lot of that is down to Erdoğan's party or the man himself. Arresting journalist for charges that will never be brought here.
He/the AkP would and have argued that, yes they are journalists but they also committed crimes. But an example is being a member Feto terrorist organisation (I will come back to this later)
What the hell is a Feto terrorist organisation?
Right so....Fetulla gulen (spelling) is a some say liberal some say not (I don't know enough to state) Islamic preacher with huge money and world wide influence based in the US. Him (Fetulla) and Erdogan were best if buddies, and there is probably good evidence that the Gulen organisation (which had its members in all High places) helped Erdogan to power in someway. This relationship ended in 2014 (I believe). A few things happed (books could be written on it) which culminated in the coup attempt in 2016 where Erdogan actually only narrowly escaped capture by some Gulen sympathetic army generals. The public (including liberals) and the majority of the military generals protected Erdogan that night.
This coup was blamed on the Gulen movement (in fairness it almost certainly was them) perhaps with some outside help cough CiA cough... probably not the CIA as it was quite an incompetent attempt at a coup that I would have thought that if the CIA had a hand it, they would have planned it better... but maybe they are slipping
Anyway...so after coup anyone involved in the Gulen movement. Was labeled a member of the Feto terrorist organisation.
So Gulen owned newspapers were shut down and staff arrested.
And so follows a massive purge of people with links to Gulen in every part of Turkish society. Now I understand getting rid/arresting people involved in the coup but not every person who went to a Gulen school or worked for a Gulen Business was involved in the coup. So why so many arrests and why so many people out of job?
Similar things have happened with the Kurdish party and their members of Parliament when they say anything remotely in favour of the PKK. Put in prison awaiting trail for months or years.
Now the PKK are responsible for the death of around 45k Turkish citizens (mainly of Kurdish orgin), they are nationalist Marxist organisation that use suicide bombing as part of what they do. As an example They kidnap teachers that have been sent to the South East to try to educate children in that region where literacy rates (in any language) have been extremely low compared to the rest if Turkey. So basically they are a horrible terror organisation recognised as such by the EU, UK, USA and most of the world. But does that Justify the arrest of the leader of the HDP and other members of Parliament who may expressed views that some may say are pro PKK?
So what's my point in bringing up these two examples?
Well it's to demonstrate that the AKP are ready and willing to go too far in their 'fight' against hostile actors. Sure arrest people involved in the coup... but really should every single member of the gulen movement be punished? Even if they had no involvement in the coup?
Does the leader of the HDP really deserve to be in jail?
He (Erdogan) has also brought back political Islam as a force in Turkish politics. Mixing religion and politics (not a good look). And he talks of wanting raise a pouis (sp) generation. The Turkish state was founded and governed for most of its existence on a strictly secular basis.
The flip side of this, is that the strict secularism meant that women who wore headscarf or example couldn't work in government buildings or attend universities. There are many other rules that went to far against the religious rights and Erdoğan got rid of these rules, and made Turkey a more religiously tolerant place (for all religions actually)
There is a kind of divide in Turkey between the Western looking liberals/secularists/naionalsits in the major (particularly to the west) cities. Who kind of look down on the other Turks and Kurds in other parts of the country for not being quite as sophisticated as them... this I buls hit based on class and snobbery, and a lot of governments pumped money away from areas that needed it and into the major liberal cities.
Erdogan was one of the people they would have looked down upon. And in his priministership/presidency he has helped balance the wealth somewhat more evenly throughout Turkey (although obviously not perfectly).
He tried to bring Turkey closer to the EU in his early reign but the EU was not a genuine partner, so he used this to his advantage (books could be written about this as well)
Until relatively recently Turkey’s economy has been doing well under his stewardship.
I'm going to finish this now (because it's already too long) despite only scratching the surface. But before I do I just want to talk about the 4-5 million Syrian refugees his party has let into Turkey and considerable political cost to himself and financial cost to the country. No other country has come close. And he deserves respect and to be honest administration for doing it.
Just look at it from a financial perspective if it takes £100 per month (not sure of the costs) to house, feed, educate, protect etc a refugee and we take the low figure of 4million refugees that's £400m per month even if wrong by half thats still a huge cost.. That's a massive take on for any country. Yet he done it.