Despite its often fraught encounters with democracy, science and secular culture, the Catholic Church’s story in the modern era is one of remarkable survival.