Ehh, I wouldn't call it luck, but ther'es definitely 'fit' involved, and of course the players have to play, but I think people generally undersell NHL coaching. There are some very visible trends
For example, Tippet referenced above--dude was absolutely amazing at getting more out of less/budget rosters but can't do much with high talent.
McLellan is an absolutely excellent regular season coach as far as setup, xs-and-os, but gets exposed in the playoffs with stubbornness, an easily scouted and countered system, and inability to make adjustments to the bench or strategy both in game and in series.