That's Blockoland, baby! Homer does an impression of a robot taking command of humans, then moves to the second mirror pictured here and does the same impression except as a washing machine taking command of humans.
The episode is Season 12, Episode 15 (Hungry Hungry Homer). The visit to Blockoland is just to kick off the plot starting with a missing piece in the Blocko set Lisa got, which leads to Homer demanding the missing piece be provided and sends him on a crusade to stick up for the little guy all around town. He finds out the Springfield Isotopes are moving to Albuquerque, but is unable to convince anyone of it without proof. This leads to him chaining himself outside the baseball stadium and going on a hunger strike until management admits the truth, but draws such a crowd that management relocates the pole inside the stadium and turns him into a gimmick known as "Hungry Hungry Homer" until a hot dog topped with evidence saves the day.