...have there been episodes where Time Travel FAILED? I mean, where we see the protagonists:
1) Fail to complete the timey-wimey trip forward or backward, and vanish?
2) Realize that the changes made have permanently affected the present... no way around it?
I think the closest ST every got was with the Voyager: Year of Hell storyline, with Annorax trying to bring his family back to life.
Not exactly a "failure," but there's a DS9 episode, if I recall, about the "Bell Riots" where somewhere in the 21st century, there are some kind of riots that help lead to the formation of the Federation down the road. The original history was that Gabriel Bell died in the riots, but then Sisko got stuck back in time with Bashir, and Bell, like, ended up dying early on in the episode with Sisko stepping in to pretend to be him.
So, when they get back to their actual time, the history books now show Sisko
as Bell, because he took Bell's identicard or whatever, and recordkeeping got spotty around that period so I suppose there were no other images to show Bell being A TOTALLY DIFFERENT PERSON.
Anyway, that's the closest to "failure" that I can think of. It kinda doesn't make sense to include a true failure scenario in a long-running show like that, because (assuming your show's premised on a linear timeline), you fundamentally alter the timeline to end up with a totally new timeline in the future based on the butterfly effect, or the characters disappear into the past and are never heard from again.
There IS an episode of Ray Bradbury Theater that adapts "A Sound of Thunder," which truly is one of these "failure" scenarios, but that's a one-off show like The Twilight Zone, so it doesn't quite count.