Aristotle argues that the ideal tragic reversal involves a character achieving the opposite of what they intended to do as a result of circumstance and their own character flaws. He cites Oedipus Rex as an example, but a lot of ancient Greek tragedies involve this trope, often overlapping with Not Quite the Right Thing.
In both The Barber of Seville and The Marriage of Figaro, Figaro's plans tend to go comically awry because of mistakes that either he or one of the other heroes make. The usual culprits are Count Almaviva's hot-bloodedness, a lover or spouse's jealousy, Figaro's Zany Scheme working better in his head than in practice, or all of the above combined. Thankfully, in Barber Figaro's last-minute quick thinking saves the day, while in Marriage the Countess modifies his scheme to make it actually work.
In Die Entführung aus dem Serail, the first really German opera by Wolfgang Amadeus Mozart, one can only pity Belmonte. When he's captured along with his bride, he says his father's rich and can give a generous ransom. Only to find out that his father is their captor's bitterest enemy. And for the lady, whose faithfulness, incidentally, Belmonte highly doubts, to learn of her bridegroom's doubtful heredity.
The titular character of Elisabeth, when her son Rudolf begs for help with a political scandal, tells him to handle it himself. The Takarazuka Revue version has her explicitly say that he's an adult and should be able to solve his own problems. (She also sounds disappointed that he wants her help in politics, just like her estranged husband/his father.) Not an unreasonable thing to say... except it was the final straw that drove Rudolf into Death's arms. Literally.
In Harry Potter and the Cursed Child, young Albus figures much of his father's anger comes from having to watch Cedric Diggory die in 1995 to ressurect Voldemort. He thus decides to use the Time Tuner to save Cedric and prevent Voldemort's rise which means a much happier Harry. But Albus makes the huge mistake of turning Cedric into a balloon to help Harry win a challenge. This creates a new timeline where Cedric, bitter and humiliated by the whole thing, joined the Death Eaters, killed Neville, helped Voldemort be reborn after all and take over the Wizarding World.
In Jasper In Deadland, Gretchen gives Jasper bottled water in the hopes of clearing his head and delaying Ghost Amnesia from erasing his memory. There's just one problem - drinking the water is what causes people in Deadland to lose their memories.
In Pokémon Live!, Pikachu's Thundershock and Thunder were the last two moves MechaMew2 needed to learn; with the list complete, nothing can stop Giovanni from conquering the world.
Sweeney Todd: The Demon Barber of Fleet Street: If Anthony Hope didn't bust in Sweeney's barber shop in the midst of his shaving of Judge Turpin, his plans to rescue Johanna Barker would have gone according to plan, and Sweeney himself wouldn't have gone off the deep end due to being denied his first shot at revenge.
Urinetown ends with the heroes triumphantly toppling the evil toilet monopoly and launching a new era of free urination. Only, as it turns out, the monopoly was right about the water shortage, the newly unrestricted flushing makes the town run dry, and everyone dies of thirst.
Little Sally: What kind of a musical is this?! The good guys finally take over and then everything starts falling apart?! Lockstock: Like I said, Little Sally, this isn't a happy musical. Little Sally: But the music's so happy! Lockstock: Yes, Little Sally. Yes, it is.