Yes. Richard Wagner (1813–1883) wrote the complete libretto (text, drama, poetry) for every one of his 13 completed operas/music dramas — from Die Feen to Parsifal.
He coined Gesamtkunstwerk ("total work of art"), insisting on unity of music, text, staging, and philosophy. His librettos are literary works: alliterative verse, mythic symbolism, philosophical depth (Schopenhauer, Buddhism, Germanic legend).
Unique among major opera composers (most collaborated with librettists: Verdi/Boito, Strauss/Hofmannsthal, Mozart/Da Ponte).