Warforged are an incredibly dumb idea that turned out to be amazingly great.
I wouldn't use them anywhere but in an Eberron game, but there they feel perfectly in place.
But the D&D monster is almost taken straight from a mythical sorcerer from Russia. Koschei the Deathless has been portrayed in images as an incredibly old man who looks almost like a walking skeleton, and he is some kind of sorcerer, and also immortal because he has a phylactery exactly as the D&D monster.
Koschei was also described in Frazer's The Golden Bough, which is still one of the ultimate introductory works on mythology. And I think Gygax even included it in some "Further Reading" lists in the back of some of his D&D books.