Certainly they are in quality of instrumental accomplishment.
James (I’m not counting Cliff, although I have always felt his legend is overrated) is Metallica’s guitar star. His rhythm playing on those early records (ALL performed by him alone) is a benchmark for tight thrash riffing.
Each and every soloist in Megadeth crushes Kirk to an extent that isn’t even funny. Hammboy recorded several distinguishing leads on the classic albums, absolutely, but he’s nowhere technically. And his playing has been deteriorating to shit these past two decades. He obviously doesn’t care.
Lars, while a “unique” drummer, isn’t exceptional in any way. And again, some of his early playing was inspired, if not accomplished.
In regard recorded quality, I’d give Metallica the slight edge for the first four, but after that, in totality, it’s not even close.
Megadeth smokes Metallica.