The Ring was written over 26 years and, halfway through, was interrupted by an existential/spiritual crisis in which he abandoned it to express his devastation (Tristan) and eventual reconciliation (Meistersinger). That episode was, of course, triggered by Schopenhauer. This crisis is reflected in the Ring; it is known that there are several variants of Götterdämmerung and its ending as he struggled to reconcile his youthful revolutionary optimism with his mature and withdrawn pessimism.
If you want Wagner's late-life musings on the matter, there is his possibly most strange essay, "Hero-dom and Christendom," which attempts to reconcile the pagan Siegfried in the context of Wagner's "Christianity." I put Christianity in quotes because Wagner's Christianity is his own invention and nothing like any established sect ruled by dogmas.
A necessary preamble: 19th-century scientific understanding was bizarre. Darwin's evolutionary theory thunderstruck humanity's understanding of itself in a way never before imagined and provided fertile ground for the now-discredited scientific racism. Germ theory was still not widely accepted, even late in Wagner's time; disease was blamed on "miasma"—"bad air". Even today, many cultures (Germany included) are suspicious of air conditioning, fans, and window drafts. They had no concept of genetics; blood took on the role of passing essence between generations. Wagner advocated vegetarianism not only out of compassion for animals (which he had an ample supply) but also because consuming animal blood "taints" the blood of the one who consumes it.
In this essay, "Hero-dom and Christendom," Wagner laments the tragic fate of the "Aryan" hero (exemplified by Siegfried), whose nobility is refined in the crucible of suffering. He controversially links this to a "higher" race, with pure blood untainted by the racially mixed "lower races". Superficial readings of this essay point to this exemplifying Wagner as a racist, although in the context of the last paragraph and the fact that racism in the 19th century was the standard, not the exception, such charges can be ameliorated in the historical context. Especially since Wagner goes further: Wagner believed that through the "holy blood" of Christ, all races, higher and lower, partaking in "Christian" communion together, can have their blood "cleansed". Through this process, all of humanity is unified as one in harmony, and racial distinctions become meaningless. He contrasts this universalist Christian vision with a damning indictment of Hinduism, which he finds metaphysically rich but condemns its fixed racial castes. So Wagner, in his own weird way, is actually announcing his opposition to racism and the overcoming of Gobineau's pessimistic racist theories.
The pagan hero Siegfried, exemplifying the old ideals of pride, honour, and domination, must fall and be replaced by something far greater in profound power: the meek, compassionate saint. The saint is greater than the pagan hero because the saint conquers the will through renunciation and compassion rather than blindly following it to their demise (as does Siegfried, as does Nietzsche).
All of this in context is why, in Siegfried's funeral march, the music begins in minor key tragedy but then turns to major key in triumph. A new era ruled by love and compassion will be unleashed upon the world. This Brünnhilde realizes and destroys the gods' old order of power and contract, including herself. The music ending Götterdämmerung is one of postive triumph, reflecting Wagner's hope that a new world order of love and compassion will one day be realized despite his pessimism. In this vision all the races embrace each other, rather than compete for power as they do in the Ring.