I don't disagree he will slow down and the end of this deal won't look great, but that's not unusual. Look at EK, Vlasic, Seabrook...safe to say this deal looks good in the first half but wont in the 2nd half however, as the cap grows, $9M will hardly be what it is today in 4 years.
You're comparing this deal to some of the worst in the league. I think that says everything that needs to be said about it no?
While you are right that the cap will go up in the coming years, that will be a large amount of money that could still have been used to improve the team that they will no longer have. In 5 years time I figure that he will be overpaid by ~1 Kapanen. Kappy isn't some world ending talent or anything, but being able to just add a player of that calibre to the team is huge and can make the difference in making the playoffs or being a contender. It is why cap management is so important.
You also have to remember that we are talking about a player not being worth a contract here. When you overpay old players, they aren't worth it. When you overpay young players, they are still expected to produce as much or often times much more than that overpay. McDavid being the obvious example here but the same holds true for AM, MM, WN, Aho, Pastrnak, DeBrincat etc.
All in all that is a huge opportunity cost just being thrown out the window to keep a star well past their prime.