Has anyone won this game honestly? I've patched the C code and only got so far. I tried savefile hacking and that didn't get me to the end. I was only able to win by compiling a version with debug symbols and playing inside the debugger. (eg. find the flag for the Wizard of Yendor's invisibility status and clear it.)
One of the big thing is knowing enough to recognize when you're in danger, before you're in danger. Stuff like "That q is too tough for me to take right now", or "I'd be screwed if that n steals X", or "I don't have poison resistance yet, so I better not fight those o at range," or "It's dangerous to be in the mines with this AC and no source of light." This comes with experience.
Another big part of it is understanding the sequencing, and how to build an ascension kit. Do you want to try to get to minetown early to grab a magic lamp? When is it safe to go to mines end, and do you need magic resistance to do it? What's the earliest you can take on a unicorn?
There are lots of other tricks (identifying wands, potions, etc), clearing the big room safely, finding the portals on the elemental planes, stealing from shops, what gives resistances, maximizing wishes, etc.
Ultimately, Nethack got boring for me because the late game is too long, and doesn't differ much between different classes. Ascension kits tend to be very similar (GDSM + silver shield or SDSM + CoMR?). I really liked what Derek Ray did with Sporkhack, and I never managed to win that, although I died on astral a couple times.