Yes, if all the Boston pieces exceed expectations and the Ottawa piece does not, the trade will be good for Boston.
I look at it like the Erik Karlsson trade. That's a similar scenario to what is described. I still don't go back and judge the basis of the return as if Dorion had any idea that he was setting up the team with prior to injuries what would have been the team's 1A/1B centre for the next decade, among other pieces - and that outside of an (at times) brilliant first season in San Jose, Karlsson would not be the player they thought they were getting until he was forced to cosplay as Bobby Orr to make himself appealing in a trade out of San Jose.
The reality is, it should have taken that 1st alone to dump Korpisalo at 3M x 4 years. So from a value perspective, Boston didn't do well. If Korpisalo ends up as a positive at 3M, Kastelic becomes a gritty fan favorite, and the 1st round pick produces a star, that is good for them but irrelevant to judging the trade.
The extreme example of that logical flaw would be if Edmonton trades McDavid for a 7th round pick, and that 7th round pick produces a player better than McDavid. Nobody would go back and say McDavid for a 7th was a good trade, but you can still acknowledge that the trade worked out.