"Treehouse of Horror XXXI" is the fourth episode of Season 32, originally produced for Season 31.
There are 3 segments. Toy Gory (a parody of the “Toy Story” franchise), Into the Homerverse (a parody of “Spider-Man: Into the Spiderverse”) and Be Nine, Rewind (a parody of “Groundhog Day” or "Happy Death Day").
The town of Springfield is voting for the next president, and Marge is in line. Marge calls Homer and asks him why he isn't voting. Homer is lounging on his hammock and checks his horoscope if he should vote. The horoscope says to not vote, so Homer hangs up and falls asleep. He dreams that he is voting, but hesitates about who to vote for president. Lisa asks Homer why, and if he remembers what happened in the past 4 years. A list shows some of what Trump has done in the past few years (One of which was spelled wrong). Homer votes in his dream, but then Marge wakes him up. Homer says that it's not a big deal that he didn't vote. On January 20, 2021 (Inauguration Day), the town is in ruins with U.S. security robots all around the city. Soon the Horsemen of the Apocalypse arrive, with flags that read "pestilence", "famine", "war", and "Treehouse of Horror XXXI"!
In this CGI-animated segment, Bart has chosen some toys to donate. Marge says he can say “goodbye” to his toys, and Bart says “goodbye” by wrecking his toys. He puts them in the box again, and gets a reward for donating the toys. Marge gives him a Radioactive Man figure, and when Bart leaves, he comes to life. Radioactive Man thinks that he’s in good hands, but a Krusty the Clown doll explains that Bart tortures toys all the time. The toys in the box tell him how they’ve been tortured by Bart and there’s no way to stop him. Later, Bart plays with Radioactive Man and pretends that he has to save the city from a bomb. Bart puts the toy in the microwave and Radioactive Man explodes. The toys give him a funeral and decide that they should take action. That night, the toys drag Bart to his treehouse, and they wake him up. Bart is surprised and says that he wouldn’t have tortured them if he knew they had feelings. Suddenly, Milhouse comes in and Bart asks him to defend him, But Milhouse tells the toys that he isn’t treated well by Bart, and he has feelings too. The toys give Bart plastic surgery and throw him out of the treehouse. Lisa discovers Bart, and realizes that he has become a pull-string toy. The family goes to Dr. Hibbert’s and the doctor explains that he can’t change Bart back. The toys then play with and torture Bart like he did to them, teaching him a lesson.
Into the Homerverse
On Halloween night, Homer is working late at the nuclear power plant. Marge calls and asks where the Halloween candy is. Homer checks the security cameras and finds out that he ate the candy. Homer runs frantically around the plant trying to find candy, ultimately finding a strange machine with nickel slots. Homer mistakes it for a vending machine, and Homers from other dimensions come out. The Homers wreak havoc on the city, eating all the food and more, while Marge has to cook for all six of them. Lisa explains that Homer broke the space-time continuum and made Homers from other dimensions come to Earth. Lisa says the only way is to go back to the machine and send the Homers back to their dimensions. The Homers return, but are soon interrupted by Mr. Burns and Smithers from other dimensions. After being victorious, Mr. Burns accidentally breaks the machine and everyone except the real Homer, Mr. Burns, and Smithers is sucked in. Marge then is with the “Homer she wants” aka Detective Homer. Suddenly, he changes into Cat Homer, who quickly leaves.
Be Nine, Rewind
Today is Lisa’s ninth birthday, and she is writing about how different it is. She’s called down for cake by Marge. Lisa walks down and Sherri and Terri tell her that the party is for losers. Lisa says that she wants to die, and then a car comes through the wall and kills her. She suddenly comes back to life at her desk, where she was writing. Everything is the exact same, and Lisa steps back and the car comes through the wall. Nelson grabs Lisa and says they need to talk. Nelson explains that he has the same ability as Lisa to relive the day over and over. Bart’s treehouse then falls on them, and they are back in Lisa's room. This time, Lisa bangs on her desk and a huge chunk of the roof falls on her, appearing back up to Lisa's room once again. Only this time, Lisa knocks on her mirror, which then smashed her. Lisa came back to life once again. Nelson then arrives at Lisa's room, where he told Ralph to take two steps back. Unfortunately, the car rammed Ralph, killing him. Anyway, Nelson told Lisa that they are both con-repeating time loops. She then asks him to work together to save each other. Nelson is about to high five Lisa, but he accidentally ends up being grinded into a wood chipper, to which Lisa does the same. However, Nelson told her that there are also other alternatives. Like a game checkpoint, Lisa revives once again. Three alternatives that Lisa and Nelson ended up being dead are: being burned alive, being cleaved by a knife, and an air conditioner Homer forgot to screw in. Then, Nelson is glad they both didn't stay dead, but then tells her that this is annoying. They need help from Comic Book Guy, who tells them that the tamperer loop is simultaneously the most ambitious and the most laziest of any sci-fi trope. He then tells them that it can be broken by being nice in Groundhog Day, saving the whales in Star Trek IV, saying "orange you glad I didn't say 'banana'?" in the knock-knock joke, and the case of the box office flop Edge of Tomorrow. Lisa tells him they tried all those, but then CBG told her they must use their special powers together to save each other. Later that night, Gil is driving his car, and Nelson kills him by throwing a cinder block toward him. Breaking the time loop, they are deemed alive. Suddenly, they disappear, after Lisa thanks him for having the ability to turn nine, and Nelson told her he learned nothing. Back home, Marge simultaneously kisses Lisa, who learned something really important: no day is ever perfect, so she just has to enjoy the day that she has. The rest of the Simpsons then wish her happy birthday. Finally, Lisa turns nine, saying the universe is back to normal, except Ralph is still alive with his head in the wrong position.