It's pretty arbitrary to compare 18th highest caphit versus the 61st...
Now when we use the power of blind context:
List of caphits for players aged 21 to 26, between 4.5m and 9.5m
Reasons for that caphit range? Wanted to narrow down to potential top 2/4 pairing defensemen coming off of ELCs with high expectations. The age is strictly for those RFA bridge deals.
Obviously nothing comprehensive that can be concluded from this but when blindly looking at caphits for young defensemen out of their ELC deals in recent years, there's a spectrum between 5m and 6m, with the outliers either being established top pairing superstars (Doughty, Karlsson) or sweetheart deals/2nd pairing expectations (Brodie and Faulk respectively).
This shows that Hamilton is relatively near his peers (around 0.3m+). Looking at prior circumstances of his skillset and results as a Bruin, I can personally look at his contract and say "that's fair." Could easily nitpick 200k one way or another but as an expectation I look at the fact despite his performance as a 20 to 23yo in the league, he's still got another 10+ years as potentially an elite defenseman. So without claiming for whether this contract is bad/good, I think it's okay to sit back and watch how the next year and two will be when he starts to take his form as a developed defenseman.
Tl;Dr contract is understandable, Dougie is young, stop being patient af