“the Church” in annalexology is the Catholic Church. But the comparison of the actions of the Catholic Church to “the Church” reveal no similarity. for example the williness to approve torture. Christian teaching or Catholic teaching?
The New Testament canon needed no Catholic council to establish it.
St. Peter, the first pope of the Church did worse: he recommended that Jesus abandon His purpose of the Cross. The Church is run by humans. Humans err. The Church doesn't err is teaching of faith and morals coming from the Church as a single voice. Approving of torture is not a teaching of faith and morals, it is a historically practiced form of judicial inquiry.
If Protestant communities of faith think that they are inerrant Catholic Church, they should pose the same question to themselves. They approved of torture, of slavery, of Nazi militarism, and of homosexual "marriage" and abortion. Not all of them, but some. Go fugure.
And if they don't think that they are inerrant, they should re-read the description of the Church as by divine will without blemish in the Scripture, Ephesians 5:27.