Is Hanifin really an all situations #1D? I honestly don't think he provides the offense for that. Can you find an instance of a player similar to Hanifin (call him a 2-3 defensemen) being traded as an expiring UFA at 27? If so, what was the return? There aren't very many prospects out there that project as 1Ds.
More importantly, if we need to give up Ed to get Hanifin we are largely moving laterally (even though Hanifin is the better player currently).
I think he isn't worth nearly what you think he is, and I say that as someone who likes him as a player and wants him. Calgary just doesn't have a ton of leverage considering the downside is letting him walk for nothing.
What makes you say that if Calgary is trying to avoid a full-on rebuild?
McDonagh is the closest I can think of. He got a 1st, a 2nd (1st conditional), Namestnikov (serviceable roster player at the time), Hajek (b level prospect- worse than Wallinder but perhaps comparable). That was without an extension in hand, though he did sign one ultimately.
For a trade with an extension in hand, the closest I think is probably Seth Jones who got Adam Boqvist (similar draft pedigree to Edvinsson, though a generally less valuable player type), upgrade a 1st from 32 to 12, another first and a second.
I honestly think Hanifin is better than Jones, but the league doesn't seem to think so. And Edvinsson is probably more highly thought of than Boqvist at the time... But I think those differences are made up for by the extra +'s in the deal.
And yes, while Hanifin isn't elite at anything, I think he's about the 25th best D in the league. Try to name 32 guys better than him. I can't.