As everybody knows, the pessimists were wrong. So far from dooming the art of painting, photography liberated it from one of its non-essential functions, namely photography -- like representations of visible reality. What followed in the next few decades, beginning with the Impressionists, was an explosion of creativity in the art of painting. Freed from the need to provide accurate representations of reality, painting became more "pure." The artist was more free than ever to indulge his creative impulses and inspirations.
I think we should bear this in mind when thinking about the decline of Catholicism in America and elsewhere in the more affluent parts of the world. (I once wrote a book about this, The Decline and Fall of the Catholic Church in America). At first glance it looks like Catholicism is doomed to fade away in the more prosperous countries, surviving only in the poorer countries of the world.
But a more careful look may convince us that what is happening is that Catholicism is losing only its non-essential functions, thus getting free to become more "pure." Perhaps this decline is but a prelude new and creative era of Catholicism -- as photography was the prelude to a new and creative era of painting.
Consider a few of the non-essential functions Catholicism has provided over the centuries for pre-modern or not-fully-modern societies and individuals: (1) In the absence of modern medicine it gave people hope that they and their loved ones would be cured miraculously of the many then-fatal illnesses roaming the world; (2) It allowed Catholics to hope that by prayer they would be able to escape poverty or at least escape the worst of its ravages; (3) It provided a heavenly sanction for the rulers of society; (4) It provided (in Catholic countries) a major part of the cultural consensus needed to hold society together; (5) In general, it provided a foundation for a hundred and one forms of superstition.
In these pre-modern and not-fully-modern societies you had, then, many motives for being Catholic, utilitarian, worldly motives. You had strong motives for Catholicism even if you totally lacked "pure" Catholic motives. But in the fully modernized countries of today’s world, you and your children and grandchildren won't be able to hold on to your Catholicism if your motives are merely utilitarian, merely worldly. For we live in a world of economic prosperity, modern medicine, democratic sanctions for political authority, non-religious bases for social consensus, and a scientific view of the world that tends to undermine all superstitions. Catholicism is no longer needed for these things.
But this frees people up to be Catholic for purely Catholic reasons. Take chastity, for example. It is a great Catholic virtue. In the old days premarital chastity - or in any case, premarital abstention from sex - was embraced by young women (and some young men) for a largely utilitarian motive: it was a way of avoiding pregnancy. Nowadays you don't need to be chaste (or sexually abstemious) to avoid pregnancy; instead you simply use contraception. If a fully modern Catholic living in a fully modern society opts for chastity, this choice can now be from purely Catholic motives. That is, the person will choose chastity, not for any utilitarian reason, but because he or she recognizes it, and embraces it, as a great Catholic virtue, quite apart from any worldly consequences.