Some bad deals you just have to eat. I would greatly hesitate in expending any assets and treasure in undoing this patently horrible deal. Let it serve as a warning to both management and the fans as to the risks of making a long term commitment to the then current favourite toy.
Honestly except for HOF players you don't extend a guy more than 1-2 years (ages 27-29) into free agency except on 3-4 year deals. 29-30 is when most drop off, some extend to about 32. Petry took a team friendly term and cap hit while still an RFA and still ended up falling off in the final year heavily. If guys are hitting UFA at 31 let them go or trade them. Never been a cup winner built with entirely 30+ players. Vegas last year might have been the oldest cup winner I've seen but still had Eichel in his prime as the leading point getter and they're looking to dump Marchessault despite winning the Conn Smythe because he's nearing his expiration date. Pietrangelo is that HOF-level player I'm talking about. Stone is too arguably. We've seen many teams win with an entire core under-25 though.
Gallagher isn't the type of guy you give big money six year deals to. Every long deal an aging player got in Vegas is for half the salary Gally gets if the term was similar or half the term if the salary was similar. Martinez got a three year deal after winning two cups in LA and being a big part of a conference finals run in Vegas (and now a third cup). Whitecloud got a 6 year deal but at 2.75. I guarantee Vegas will move out one or more of the 30+ guys within the next year as well and recoup quality assets while not retaining because they didn't overpay anyone.
I am still in disbelief of the Gally extension, I am pretty sure I was one of very few that hated it immediately. I thought his first contract was Bergevin's best work (not signing Subban, Patches, or Price to 10 year deals was his worst, the bridge deals f***ed him three separate times. Patches wasn't as bad at least). Get Gally at 3.75 for his entire productive career and then flip him to Vancouver for a premium, it made perfect sense and Vancouver even had an idiot as GM in Jim Benning (who gave Guenther ++++ for OEL and their owner wanted to compete).
Except he then extended an already declining and injured Gally coming off a serious injury (same guy who didn't want to extend an extremely healthy Norris-winning Subban). The extension combined with Armia's cost us Kotkaniemi, which later led to Hoffman, Dvorak and Savard which cost us Lehkonen and the ability to take back contracts when teams were paying a first for the privilege. Molson should have fired Bergevin as soon as he refused an extension (and before that to be honest). Molson got too concerned with the optics of firing the GM after a finals run (where the GM should have been fired years ago and the team made zero additions to go on the finals run, made the playoffs by Calgary losing instead of us winning in a messed up division year, just a bunch of guys playing their hearts out knowing it was their final year in the league) and made a bad decision as a result.