Here is a list of recent cup winners and the first top 5 pick they had before winning
2024 - Panthers - Gudbrandson (2010)
2023 - Golden Knights - N/A as they were an expansion team
2022 - Avalanche - Duchene (2009)
2020/2021 - Lightning - Stamkos (2008)
2019 - Blues - Erik Johnson (2006)
2018 - Capitals - Alex Ovechkin (2004)
2017/2016 - Penguins - Ryan Whitney (2002)
2015/2013/2010 - Blackhawks - Cam Barker (2004)
2014/2012 - Kings - Thomas Hickey (2007)
2011 - Bruins - Joe Thornton (1997) / Lars Jonsson (2000)
Are we really considering these successes? Most of these teams took 10+ years to win anything, and also had a bunch of early busts. In many of these cases, it wasn't even the guys taken with those picks that was the key but guys taken later like Kucherov, Bergeron etc.
Complete tear downs/rebuilds are generally bad strategies that take extremely long to yield results, so long that you won't even know if that was the major reason for it. This is of course, not even considering all these teams that attempted to tear it down and have been stuck bad for a very long time (Buffalo, for one).