This isn’t the answer, and I hope it will trigger an answer from the more knowledgeable.
Notions of human-crafted art as an expression of the sublime are not particularly new. But in the 19th century, art inspired not merely “almost” religious reactions; it actually came to occupy the place of a surrogate religion. This was dispelled with World War I, and the various forms of art retreated from the Sublime in different ways. The visual arts did it with dadaism, and they’re still going on about it to this day.
I got the fullest articulation of this from looking over the shoulder of someone doing his PhD on the Italian philosopher Carlo Michelstaedter; you can see a reflection of this in the Wikipedia page, where Man overpowers malign Nature through capital-R Rhetoric. Poor naive bastard, I thought. Just as well he killed himself before WWI.
Wagner was the most full-throated expression of this notion of a surrogate religion. He was a prolific writer despite being a composer; he architected his operas as Total works of art, combining the visual, the musical, and the literary; he ladled mysticism heavily both in the librettos and the staging of the operas; and he had a lot of loyal acolytes.
Why would Wagner think that up? There was a change in how music was produced, from court entertainment to subscriptions and paying customers. There was a change in how the artist was regarded, from decorator to conduit of the sublime to expressor of emotions. Both are wound up in where Romanticism comes from. But the extent to which Wagner took it must have come, in at least some part, from the diminishing of power that religion had over the intelligentsia.
Wagner comes before Nietzsche, but to many Wagnerians, God was already if not dead, sickly: in a rationalist, enlightenment worldview, religion just didn’t hold the same mystique. And since this worldview was still quite recent, the deist and atheist intelligentsia went looking for their recently lost experience of the transcendental elsewhere.