Almost the entire core of those Harbaugh teams was already there for a while before he got there and the team absolutely sucked and was a mess before he came in. Trent Baalke is a terrible GM. Harbaugh took that average roster he inherited and made 3 straight championship games and 1 Super Bowl, with all of their playoff losses being extremely close. Baalke did nothing to improve the roster whatsoever in Harbaugh's time there and by his last season it was pretty incredible he even got a .500 record with that aging core that he got the most out of where his predecessors could not. Baalke somehow won the power struggle in the front office and Harbaugh went back to college, Baalke lasted 2 more years (5 & 2 win seasons) and handed over a terrible roster to John Lynch and Kyle Shanahan who then had 2 more bad years before finally cleaning up the mess Baalke made. When the 49ers made the Super Bowl in 2019 with Shanahan 3 years after Baalke was gone, only 2 key contributors remained from Baalke's time as GM -- Arik Armstead and DeForest Buckner, both high 1st round picks that were far from critically important and haven't contributed to any of the 49ers' success since that season. And Baalke has remained terrible with the Jags now, despite getting one of the best QB prospects ever in Lawrence and SB winning HC in Pederson.
Harbaugh certainly has his faults but the NFL results speak for themselves. The biggest thing he would bring is in the culture. His 49ers teams showed up and were 100% fully prepared for every single game and up and ready for every single snap with pure focused intensity. They played hard nosed football and very very rarely made stupid mistakes. The polar opposite of what the Panthers have been every year since Rivera was fired. He's a great offensive mind, great in game decision maker and great motivator. Tepper not even being willing to consider him is just a huge mistake, especially if it's true that he wants this job, as it's already been made clear that other top candidates like Ben Johnson don't have much interest in coming here and for good reason. Harbaugh will piss people off with his huge ego, Tepper included, but if he wins that just flat out doesn't matter. College is really a different game and I won't speak to his tenures at that level.