This was mainly a satire of the then-recent Gulf War, with pistachios filling in for oil. Then again, now that I think about it, it satirized a number of wars- World War I with the trenches, as mentioned, and also World War II, as a number of songs from that era are parodied (“Don’t Sit Under the Pistachio Tree,” etc.) I think protests (such as those in Vietnam) were also mentioned.
Oh yeah! Eventually, someone actually DIED, and the war ended, and the media wouldn’t admit that someone died. You’re right, it was a pretty interesting metaphor.