To me, Danforth's actions help lead to the end of the theocracy because they show how unthinking and unbending that theocracy is. This shows up particularly clearly in Act IV when Danforth will not give in and grant reprieves to people like John Proctor and Rebecca Nurse.
By Act IV, the people of Salem are getting to be a bit unhappy with the court. And Parris and Hale and others like them are worried that this will get worse if respected people like Proctor and Nurse are executed. But Danforth will not give in. He is adamant that the executions must go ahead unless the two confess. By pushing ahead simply because he wants to maintain his own power and influence, Danforth makes people even more unhappy with the theocracy.