I’m a professional Latin American historian, so let me make a comment. The big issue with Father Hidalgo was that he couldn’t keep his “army” under control. After the Grito de Dolores (his famous call for revolution), a large number of mestizos (half white / half Native America) flocked to his banner, along with Native Americans. Hidalgo also had the support of a significant (but MUCH smaller) group of criollos (white Spaniards born in the New World, who felt prejudiced against by Peninsulares, white Spaniards born in Spain who were given preferential treatment in the colonies and seen as “more” Spanish.) Soon, he had acquired an “army” of about 80,000 people. The only problem was that almost all of these “soldiers” were ordinary citizens who had never fought a day in their life. The army of Hidalgo got so large that he lost control of it, and one night, it entered the city of Guanajuato against his orders. The largely mestizo mob massacred the entire white population of the town (both peninsulares AND criollos), which tried to hide by locking themselves in a granary. The building was burned down with everyone inside. After this point, Hidalgo had lost most of his control, and the crucial criollo support that they needed was lost. Why was criollo support needed? Well, they were the ones who had access to armories and could get weapons. They could also legitimize the face of the revolution to the Spanish government and other major powers of the world. The mestizos made NO distinction between criollos and peninsulares in the massacre. They saw them all as white, and all as enemies.
Now, what Hidalgo also didn’t realize is that creoles and mestizos were fighting for two different things. Criollos wanted an independent Mexico in the same way that British colonists wanted an independent US. They wanted freedom, but they also wanted to maintain the status quo, with Native Americans and mestizos in a subservient status. Mestizos were fighting to overthrow the entire white establishment and take their country back. They were looking for racial equality (or racial justice). Their ideas for government were COMPLETELY incompatible, and so the alliance was never really going to work anyway.
I haven’t really studied the excommunications, but I would guess (and this is only a guess) that it likely stemmed from the Massacre at Guanajuato, because the entire white population (including all the priests and bishops) was wiped out. It could no longer be considered a “just war”.