We get a hint to the answer to this question in WoWHead's recent interview with the devs regarding Legendaries in Shadowlands:
We will craft our legendaries in the Forge of Domination - this is the same forge with which Frostmourne was made, and we'll learn exactly how, and by who, it was crafted.
Given the name of the forge, this most likely extends to the Helm of Domination as well.
They never did explain exactly how Kil'jaeden and the Nathrezim created the Lich King (especially given how powerful he ended up being). This is Blizzard finally explaining the mechanics behind how the Lich King came into being.
My educated guess: KJ and the Nathrezim of the Burning Legion struck a deal with one of the death entities in the Shadowlands (specifically the one who oversees the Forge of Domination) to craft the helm and sword.