The name of the episode is a reference to Friends (1994-2004), which typically titled its episodes along the lines of "The One Where...". Friends is one of the shows parodied in this episode, in the sitcom Ultimate Buds.
When Dominic Purcell was being Dhan, the Loomworld version of Star Trek's Khan, Marc Guggenheim asked him to quote a line from Star Trek II: The Wrath of Khan (1982) directly because he is a fan of Wrath of Khan. But Purcell had never seen Khan before, so in the episode, you are seeing his imitation of Guggenheim's imitation of Ricardo Montalban.
This episode has many similarities to Season 2's Doomworld (2017). Both are penultimate episodes of their respective seasons. Both have alternate takes on the title card. In both episodes, the Legends are trapped in an alternate timeline because the season's "big bad" acquired the reality-changing item the team was hunting for.
The plot is an homage to "1984," a novel by George Orwell, which is about a totalitarian and repressive society that rewrites the historical record to suppress rebellion and free will.