The 30 years war was a rather odd time in history. By the end, the Pope was more afraid of Catholic France than Protestant Germany, and actually helped Gustav Adolphus some (who had also been paid by France before). At least one history of the war that I have read says that it was really a fight between three Catholic powers, Spain and the HRE, France, and the Papal States, that was fought in the Protestant estates.
Hence you have the Catholic Holy Roman Emperor storming Rome with an army of Lutheran/Calvinist mercs. Who a few years past had been fighting against said Emperor.
Luther would not have survived without the protection of his lord, Frederick. The Reformation in Germany was fostered by the German princes more for political than theological reasons, just as it was in England. In the end, Germany was left to his brother Ferdinand who was more accomdationist than Charles, and each prince was allowed to decide whether Lutheranism or Catholicism was to be the state religion. Individuals were left to decide whether to accept the official faith or to move to a state where theirs was professed. The most sincere, of course, moved.