When reading Charles Robert Maturin's Melmoth the Wanderer I couldn't help but notice that Isidora's fate largely resembled Gretchen's in Goethe's Faust and especially the endings of both storylines are largely similar.
Apart from the obvious connection of Melmoth's tale being a Faustian tale itself and from their nature as innocent girls seduced by the protagonist, the parallels between Isidora and Gretchen are quite direct. Both ultimately conceive an illegitimate child from him and end up in the dungeon for their involvement with Melmoth/Faust, losing their child (although Isidora's part in the child's death is less direct, or at least more ambiguous). Both are visited in their cell and tempted a final time by their respective lovers to join them in freedom, but ultimately choose heavenly redemption instead. This scene itself struck me as quite a resemblance beyond just the obvious similarities of Melmoth and Faust making deals with the devil.
So I wonder if that part in Melmoth the Wanderer took a direct inspiration from or is even a reference to Goethe's Faust in particular, or if it is actually relying on older and more general elements of the Faustian legend that Goethe also took inspiration from, or if it is just a downright coincidence altogether. Is there any more information on this? Has the author maybe commented on it or has someone already done a more extensive analyisis of the evolution of the stories? Or am I maybe missing other elements that substantiate the connection even clearer (or refute it altogether)?