While I certainly don't condone the actions of the popes throughout history, there was nothing in principle wrong with gathering the leaders of Christianity together at multiple conferences over the centuries to address issues of controversy and weed out teachings deemed to be false by the majority. The alternative is to allow false teachings to proliferate without bound.
Acts 15 describes the first of these councils in Jerusalem with the actual apostles present which serves as a model and an implicit endorsement of the process.
I will concede that at each of these major events we are counting on the Holy Spirit to oversee the decisions that were made under the doctrine that inspired scripture must be preserved the same way if it is to reach us so that we can obey it as commanded. This is an article of faith backed up by the Scriptures that Jesus Himself endorsed.