I think you'd need a lot of stipulations to make it work. Like, a team can't buy out a guy they've acquired in the last calendar year or two seasons or something. So a team can't go offer a 34-year-old a $40m deal over 5 years one summer with the intent of just paying him out after a season or two.
But looking at situations like the Flyers have, you realize how the most rigid current rules can hurt competition/parity. Certainly have a bunch of boneheaded contracts they shouldn't have signed, but they also have $20m tied up in guys who may not play hockey again (Ellis, Couturier, Atkinson). The LTIR system creates relief in-season, but a team with a couple forever-injured players on long-term/big-dollar deals can't do much to improve during the offseason. That's no one's fault (unless the medical team screwed up), that's often just bad luck.
The rigid cap encourages teams to push contracts longer to get players paid what they deserve while still remaining cap compliant, and then people get frustrated when teams engage in LTIR f***ery to make up for lost talent. It's a tough, violent game and I think there should probably be at least a small relief valve for teams when injuries turn key players into major cap obstacles.
I like the earlier suggestion of potentially tying buyouts to say, a draft penalty or something. You definitely need to make a system that can't be overused and abused. But I think teams should have options. It's pretty hard to stay engaged following a team when you know it's gonna be handcuffed competitively for the next 5 years because two guys had unfortunate freak injuries or something—losing the players' contributions is bad enough.