Megadeth is a strange band. I really dig them, but their output has been really spotty to me.
I agree with bosk1 that the band really didn't hit its stride until Rust in Peace. That said, I am a bigger fan of early thrash, so I dig the stuff that came before a whole hell of a lot. But if push came to shove, Rust in Peace was the band's high water mark. Like all bands in the early 90s, they capitalized on that with Countdown to Extinction, which was a bit more polished, but still thrash with a bigger emphasis on bringing in hard rock people. It worked. Metallica did the same jump from ...And Justice to the Black album, Queensryche from Mindcrime to Empire, etc. It was simply what was done back then. They all did it.
Youthanasia followed, and like bosk1, I really like that too, although it started to veer a bit much into melodic territory for a thrash band, IMO. Again, Metallica had the same trajectory, but worse, going at it full tilt with Load. Then came Cryptic Writings, if my memory is working this morning. In some parts, its heavier, and in other parts, its much more commercial. It was really a hit and miss album for me personally, although I liked probably four of five songs. The producer they used on this album convinced Dave to approach things in a different way, and that really was captured on RISK, where Megadeth fell off the wagon.
Even when the band put out The World Needs a Hero, it really wasn't much better than Cryptic, just darker (and killer artwork). The frustrating thing on that record was that one of the best songs from that era was a b-side, "Kill the King." That and "Disconnect," for me, are tops from that album cycle. They started making their way back (for me at least) with The System Has Failed, and that continued with United Abominations, and Endgame. I thought that three-record run was dynamite, with the occasional bad tune (for example, that horrendous ballad that is the only bad track on Endgame).
Then Dave showed he didn't learn. He once again started trying to go more melodic, with Thirteen, with what was to my ears, his attempt to do another Countdown to Extinction. It was OK, but...eh. And Super Collider...the title track is awful. But I really dug Kingmaker and Dance in the Rain. But the album sort of fell flat after the title track was pushed so hard as the single. Then, finally, the pendulum started swinging back high the other way, with Dystopia, which I think is probably a top-5 in Megadeth's career. (After Rust, Countdown, Peace Sells, and United Abominations). It's up there with Endgame for me in that 5/6 territory.
But its just funny to me that every time Dave makes some inroads, he tries to go commercial, and then has to reset all over again. Honestly, thrash bands have the most difficult time. If you're thrash, you're not really given a lot of leeway by fans to explore new musical ground. You get some, for sure. But once it veers into that commercial hard rock territory, it just feels wrong. Metallica, as much as people laud them...they haven't sounded like Metallica since the Black album. Hell, they have "METAL" as their name, but Load and Re-Load were hard rock at best. They never did find their way back to thrash (and the Black album was not thrash). They've tried, but it just sounded contrived. Megadeth has had more success going back to the thrash well, but unlike Metallica, never exploded into a global icon, so they have less leeway with fans for whatever reason.
But even next tier thrash bands, such as Testament and Death Angel. The moment they veer into commercial territory, it doesn't quite feel right, and then they realize it and right the ship. It's not that the commercial sounding stuff isn't good, but you expect thrash bands to thrash, not be a catchy hard rock band.
Other bands that weren't thrash, but were metal/hard rock, had wider boxes (to a degree) to work in. But if you were thrash, it sort of handcuffed you (unless you were Metallica - and even then, all the diehards know that KEA-Black album are the best in the band's history, and from Load-present, aren't even in the same ballpark, even if they won't admit it publicly).
Megadeth though - what a rollercoaster ride. Hopefully, with the end probably being near (Dave seems to be declining, the shows are shorter, everything is downtuned -- which is crazy, considering nothing in Megadeth's catalog is hard to sing), Dave has realized this, and will give us another album or two of heavy, great thrash metal to bookend things. Fingers crossed.