There is a long and storied tradition of unspeakably awful deathtraps showing up in dungeons. Kind and generous dungeon masters would allow such traps to be found, but others would skip the tedious step of permitting the party Thief to check for traps, and simply spring the trap upon the unsuspecting victim, sans saving throw, sans opportunity to escape, and sans chance to survive.
These evil Dungeon Masters often point to Gary Gygax as their inspiration. Gygax was, by most accounts, a tough-but-fair DM, but he also created the module Tomb of Horrors: the most trap-filled, instantly-lethal, no-saving-throw dungeon published at that time. (It may still remain the most-lethal professionally-published dungeon, for all I know.)
Some examples of the kind of traps Gygax used in the Tomb of Horrors:
- A tapestry that, when torn, fills the entire room with green slime (which is nigh-instantly fatal).
- A variety of cursed things: a Cursed Spear of Backbiting (does exactly what it says on the tin, to your back), valuable items that summon demons when taken, and a gem seems to grant you a wish, but then explodes (killing all within 15 feet)
- An archway that causes you to reverse gender and alignment if you walk through it.
- A variety of teleport traps that take you back to the beginning of the dungeon, sans your equipment.
- A giant face, with a 3' wide mouth you could crawl into – it's actually a Sphere of Annihilation (die immediately, no save). Some of the teleport traps mentioned above dump you right in front of said face (instead of at the dungeon entrance), possibly giving you the impression that if you walk into the face, you'll end up back where you were before you teleported.
On a personal note, I have played through a few Gygax-inspired dungeons. The twisted traps that a clever DM can come up with are truly amazing, truly enlightening, and truly lethal. (It was good fun; we all expected to die horribly, and were not disappointed.)
The Duck of Doom, then, is likely inspired by exactly that sort of Evil Dungeon Master. A duck that curses you horribly the instant you pick it up is exactly the kind of thing that an Evil DM would put in.
For the phrase "Duck of Doom", the oldest role-playing-game-related results I found on Google were from Munchkin, so Munchkin itself is likely the originator. (There's some ancient Australian bird, Bullockornis, occasionally called the Demon Duck of Doom, but it's utterly unrelated to "harmless" rubber ducks in dungeons and cursed items.)