The Happy Meal
Boxer's death is an allegory-within-an-allegory for Stalin's betrayal of the proletariat.
The Sit-Down Meal
The pigs betray the principles of the rebellion over and over again. Seriously, they're so much betrayal that we can't even keep track of what the original principles were (which is kind of the point). But the worst is definitely what they do to Boxer.
After Boxer's lung collapses, Squealer tells everyone that Boxer is going to be taken to a veterinary hospital in Willingdon for surgery. But he's lying. Benjamin reads the side of the van to the gathered: "Horse Slaughterer and Glue Boiler" (9.19). But it's too late for Boxer; he tries to kick his way out of the van, but he's just too old and weak.
A few days later, Squealer comes back and explains the "misunderstanding." He says the surgeon purchased the van from the horse slaughterer, and just hasn't changed the name yet. Sure. Napoleon holds the horse a memorial service, and ends it by reminding everyone of Boxer's two favorite maxims: "I will work harder" and "Comrade Napoleon is always right" (9.29).
What gives? Well, Boxer is the perfect proletarian worker. He never complains; he's super loyal; and he literally works himself to death. And his reward is being sold off, slaughtered, and turned into glue.
Boxer's betrayal doesn't match up with any specific episode in Russian history. Instead, it's a little allegory for Stalinism as a whole—betraying the very workers it was supposed to help.