It was the Pie Man episode. Season 15 episode 19, “Simple Simpson”, apparently. Mr. Burns blackmails Homer to pie the Dalai Lama for his - as he says “red Chinese masters”.
Most Simpsons seasons were anti-nuclear and anti-Chinese in more than a few episodes. They sorta phased out the anti-nuclear stuff in recent years, but the anti-Chinese stuff stayed. Even later seasons have at least one episode with some snide joke about sweatshops or oppression. They got moderately less racist, though.
China has always been the acceptable target for racism in the west. They might not do the Mickey Rooney “Breakfast at Tiffanys” thing anymore, but they’ve never stopped saying bad things about China. And it will only become more prevalent over time. We’re probably going to start seeing depictions that make ww2 depictions of the Japanese look tame.