You say this as if him being projected for 5 WAR is nothing. Only a handful of players reach that mark in a season, and few are projected to perform at that level. I think barring any aggravations of current injuries or the emergence of new ones (entirely possible and should be factored in), JD is probably a true talent 4 win player if not better for some years to come. Decline is obviously to be expected for a player his age, but it won't be so precipitous that he's a sunk cost. Remember we had Bautista throughout pretty much the same stage and that turned out pretty well for us.
My point is simply that if you have a chance to retain a player this good at a non-exorbitant cost, you do so and figure out the rest later.
I don't think anyone saw Pujols falling off a cliff the way that he did (unless you believe the age rumours are true), and Hamilton was a pretty risky player himself. And yes, I do understand the risk of signing a player in his decline phase to a longterm deal, that's definitely a huge consideration to take if/when we decide whether we want to keep JD when his team control with the Blue Jays runs out.