Well, the Habsburg Crown repopulated the region with ... Germans (that's something Szombathely hadn't had yet). And with increased population the city began to prosper again. Ferenc Zichy, Bishop of Győr built a high school in 1772. And the new bishop of Szombathely, János Szily had the ruins of the castle demolished and added new buildings, including (of course) a cathedral, the episcopal palace, and another school.
In 1809 Napoleon's armies occupied the city and held it for 110 days, in 1813 a cholera epidemic claimed many lives, and in 1817 two-thirds of the city was destroyed by fire. Maybe praying didn't save the inhabitants from all that much misery, but it left them with some interesting churches.
And, honestly, maybe praying did help: Szombathely ceased to be the centre of Western Hungary after the horrible Treaty of Trianon, but at least stayed within what remained of Hungary (the Austrian border is only 10 kilometers away). And it survived the American bombings in 1944 and 1945 as well as the Soviets taking over the city in that same year and again during the Uprising of 1956. So, the city is still there and worth a visit.