This version of history might be a hard sell to the victims of the Inquisiton!
It was not the Catholic Church that persecuted heretics, it was the governments of France and Spain.
I think you are rather credulous to believe that the Church teachings which come down from Jesus mandated persecution, torture and death.
It is a long story, but in short, some heretical groups in France, including a lot of Catholic priests, began teaching that marriage was evil and suicide was good. Thus, men left their families, who then were brought to poverty and starvation. Then the men lived in fornication, since that that was not marriage, and it was not evil like marriage. They also promoted suicide. These were the Illuminati, the Albigensians and others.
The Pope urged the bishops to put a clamp on these teachings since they were gravely harming society, putting the ex-families, the women and children of these men into poverty and starvation and then the men were urged to commit suicide. While the Church in Europe, as always, allowed freedom of religion, within reason, these groups went outside of reason.
The bishops refused to do anything, and instead protected the heretics, of whom were many Catholic priests. After many years and inaction by the bishops, the Pope urged the goverment to force the heretics out the country, to protect familes and society. Finally after many years, the goverments began to do this. Naturally, the heretics rebelled, and in cities where they had their strongholds, they fought against the goverments. And since they looked just llike other citizens, they infiltrated the goverment and others became traitors. The govement responded by picking up the old pagan practice of torture, to find out who the traitors were. And if the traitors were found they would be put to death. Of course, the Church had always said the state had the right to use the death penalty for serious offenses, and the goverments thought being a traitor was certainly a serious offense. The Church NEVER permitted torture and never authorized such horrible methods.
Nevertheless, the goverment officials felt they did not have to listen to the Church, they could do what they wanted. So they tortured. But of course, those tortured said anything the govement wanted to hear and they implicated lots of innocent people, who would be put to death. So others thought of using Church scholars to find out who was really a heretic, or a traitor opposing the goverment, so that innocent people would not be put to death. That was the beginnings of the inquisition in France. The govement used Church theologians to see who was really a subversive traitor, then the goverment would put them to death or torture them. Many more people were set free this way when the vast majority of the accused were found innocent. The Church could not refuse to cooperate, because then more people were put to death. The Church opposed the torture, but she could not oppose the use of the death penalty for being a traitor, because she taught that the state does have the right to use the death penalty in certain situations. All the Popes could do was urge that it be used as the last resort, as little as possible. The Popes urged the rescue of many as possible from these government thugs.
But, of course, the enemies of the Church today, who are not exactly known as being bastions of the truth, simply shorted the whole story to that the Catholic Church, in an effort to discover heretics, tortured those who dissented and put them to death, simply because the heretics did not believe all Church teachings.
This is the version you believe and what others believe.