Powerful, even artifact/relic level magic items don't have to ruin a campaign if you plan for them. The big issues are with unlimited usage, such as uncharged or quickly recharging items, or those with highly random effects. I've had lots of experience over the decades, so I've seen how they can be used well, and how they can be used badly. Here's a story of each, plus an humorous, albeit insane, story from my earliest campaign.
I ran an epic 5E campaign that ran from level 1 to 18, ending by facing Lolth, the Queen of the Demonweb Pits. The party found Doud's Wondrous Lanthorn at about level 10, which could replicate pretty much every light based spell, plus had other powers. However they needed the different lenses to work, as they only had the 4 crystal lenses not the 7 gem lenses needed to unlock all the abilities. With only a few abilities, it wasn't very powerful for that point in the campaign. As the campaign progressed, they recovered various lenses that unlocked more and more abilities as appropriate for that level. There was also the cost to fuel it (expensive gems), and the person attuned to it would die forever if the flame ever went out, so they didn't use its powers willy-nilly.
A friend of mine during 3E figured out that you could make a ring of infinite wishes (cast wish as action every round) using the rules in the DMG. It was insanely hard to do, but he was thinking about putting it in a campaign and wanted to justify its existence mechanically. I pointed out that he essentially created the One Ring, and best be ready for that level of impact. He wasn't, and the entire campaign was a fiasco, where the party killed each other to gain control of it.
WAYYY back in 1E, I inherited a campaign that was in the mid-20th level (1E and OD&D had unlimited progression). As they neared level 30, they had found a Deck of Many Things, which they'd experienced once before. For whatever reason, these morons decided to bet magic items on an insane game of "5 card draw" (it was actually stud, but we didn't know the difference). Each player would draw a card from the Deck, then each survivor could wager a magic item that would have to be matched in value or fold. In theory whoever had the best hand won, but in reality the only survivor won. One lost all his wealth and magic items, one had his soul stolen by Orcus, and another was Imprisoned within the astral plane. The two then departed to recover the two that were lost, after taking their loot of course!