Bill Walsh’s son, Craig, watched Super Bowl XXIII from a suite at Joe Robbie Stadium in Miami with quite a crew: It included Senator Ted Kennedy, O.J. Simpson and rock-and-roller Huey Lewis.

“We were all together drinking rum and Cokes — we probably had 10 each,” Walsh said. “We were cheering and drinking and having a great time. And we all fell out of our chairs at the end.”

At the end, however, it was Bill Walsh, publicly viewed as the cool mastermind of an NFL dynasty, who was the biggest wobbly-on-his-feet mess.

Moments after the 49ers’ 20-16 win over the Bengals on Jan. 22, 1989, Walsh met Cincinnati head coach Sam Wyche, wrapped his right arm around Wyche’s shoulder and nearly collapsed. Wyche, a former 49ers assistant, grabbed his ex-boss around the waist to keep him upright.

Then, in the locker room, Walsh fell apart. After broadcaster Brent Musburger asked if he’d coached his last game, Walsh bent down, began sobbing, placed the back of his left hand over his face and turned away from Musburger to fall limp into Craig’s arms.

“He was like an old teddy bear,” Craig Walsh said, “and the stuffing had been knocked out of it. There was nothing left.”

Thirty years after that victory, Walsh’s final game with the 49ers, there are those who wonder why The Genius exited on top: Of the 32 coaches who have won a Super Bowl, only Walsh, among the greatest of the group, did not coach another NFL game after winning a title.

And this week, as New England’s Bill Belichick aims to extend his own record by winning his sixth Super Bowl on Sunday against the Rams, there remains a what-if question: Would Belichick, 66, be chasing Walsh’s record if the creator of the West Coast offense hadn’t left a dominant franchise after winning his third Super Bowl title at age 57?

However, those with Walsh for his final seasons with the 49ers are certain he wrung the most from his NFL head-coaching career. His 10 seasons with the team exacted a vicious toll on a man whose brilliance was rivaled by insecurity, sensitivity and inability to handle failure.

Walsh was not Jim Brown, Sandy Koufax or Barry Sanders — men who retired at the peak of their powers. He was, at the end, far closer to Willie Mays, with the Mets, stumbling in the outfield. There was nothing left.

Walsh, who died of leukemia in 2007, finished his coaching career at Stanford (1992-1994).

“I know Bill lamented walking away in his later years,” former 49ers President Carmen Policy said, “but I didn’t think Bill could have coached another year. Not in the NFL.”

Indeed, what the public witnessed in the moments after his last game was privately on display throughout an arduous 10-6 regular season.

Before Walsh was propped up by Wyche, he was so emotionally fried that he was barely able to board the team plane after the 49ers blew a 23-point lead in a loss at Arizona in early November.

And before he cried in the locker room, Walsh, sitting with Craig on a post-defeat flight, silently wept as he stared out his window. There were also two regular-season meetings with Policy and owner Eddie DeBartolo in which Policy said Walsh had “emotional breakdowns.”

“We had serious thought that Bill would not be able to finish the season,” Policy said. “… It was really difficult to witness Bill like that. Because here you have this Hall of Fame coach who has had a major impact on professional football, especially the way the game is played offensively … and you just see this happening.”

The nadir was a 9-3 home loss to the Raiders in November in which the 49ers scored their fewest points in five years and fell to 6-5. DeBartolo and Policy were wondering if Walsh would quit. And reporters were wondering if Walsh would be fired.

Four days after the loss, DeBartolo had to issue a public vote of confidence, telling the media of the man who then had an 88-58-1 regular-season career record: “He is definitely the coach of this team.”

However, Walsh’s assistants wondered how much longer their boss — or anyone else — would be coaching with the 49ers. Defensive coordinator George Seifert, who replaced Walsh as head coach, recalls a staff meeting around this time in which dinner was served. The assistants referred to it as “The Last Supper.”

No one was feeling great. But Walsh was having trouble functioning.

“There were times when we lost a game and he might not come out of his shell and start working on the next game plan until Thursday,” Seifert said. “It was that emotional. I don’t exclude myself from being bothered by the fact that we lost a ballgame. But Bill was as much in the tank as anybody I’ve ever seen when we’d lose a game.”

Ralph Leef, who covered the 49ers for the Santa Rosa Press Democrat, broke the story in 1989 that Walsh was likely going to retire after tracking down DeBartolo at Doral Country Club in Miami a week before the Super Bowl.

A year later, Leef broke another story. After the loss to the Raiders, Walsh, who demanded control, handed assistants Mike Holmgren and Dennis Green most of the game-planning responsibilities for the remainder of the season. Leef recalls Holmgren getting saucer eyes when he recalled his reaction to Walsh, who also served as general manager and president during his tenure, relinquishing power.

“When you think of Bill Walsh and The Genius and everything,” Leef said, “and here he basically turned (the offense) over to those guys.”

Walsh believed his West Coast offense could be unstoppable, achieving a level of perfection. However, he couldn’t control his 11 offensive players. And he couldn’t make the correct call on every snap.

The inevitable failures — both big and small — had ravaged him by his final season.

In Walsh’s book, “Finding the Winning Edge,” written in his retirement, Walsh acknowledged his personality flaw that no amount of success could erase.

“I was a tortured person,” he wrote. “I felt the failure so personally. ... Eventually I couldn’t get out from under it all. You can’t live that way long. You can only attack that part of your nervous system so many times.”

Said Craig Walsh, who routinely traveled with the 49ers in his father’s final seasons: “He would confide in me that winning meant nothing. Losing meant everything.”

Walsh had three losing seasons with the 49ers. And he considered leaving coaching after his final two.

In 1980, Walsh’s second year, center Randy Cross said Walsh openly pondered quitting during an eight-game losing streak in the midst of a 6-10 season.

“Some of us were standing in the hallway before the team meeting and he looked at us in a moment of honesty and he kind of said, ‘I don’t know how much longer I can do this. I hate this,’” Cross said. “As a player, you kind of go, ‘Uh, wait a minute.’”

After the 1981 season produced his first Super Bowl, Walsh considered resigning after the 49ers went 3-6 in the strike-shortened 1982 season. Policy said Walsh wanted to move into the front office and hire another head coach.

Walsh secured his second Super Bowl in the 1984 season, but misery followed. The 49ers had a 33-13-1 regular-season record the next three seasons, but went 0-3 in the playoffs. In 1987, they were 13-2, but were stunned at home by the Vikings in the divisional round. Two months later, DeBartolo stripped Walsh of his title as president.

“Life got real miserable for him after (the loss to the Vikings) happened,” Cross said. “As it got miserable in ’86 when we lost in the playoffs. And in ’85 when we lost in the playoffs …

“The standard that he came to build — and Eddie came to expect — was nothing less than championships. And that’s easy to say. People spew that garbage all the time. But when that is your day-to-day life, that will no doubt consume you eventually. Everything Bill created sort of came to be the reason he had to step away.”

Craig Walsh said his dad was “mortally wounded” by the 1987 playoff loss to Minnesota and limped into the 1988 season.

Former Stanford quarterback Steve Dils, who had played for Walsh in college, saw him before that season’s training camp and was stunned by Walsh’s condition. In “Guts and Genius,” Dils told author Bob Glauber: “I remember thinking, ‘Wow, he looks like it’s the end of the season. He looked worn out. I said to myself, ‘That ain’t a good look.’”

Walsh was looking worse when the 49ers fell to 6-5, but the team rallied to win four of its final five regular-season games. The 49ers reached the Super Bowl with blowout postseason wins over the Vikings and Bears, respectively, and Policy recalls laughing with Walsh in the days before kickoff in Miami.

“He seemed,” Policy said, “so light on his feet.”

But whatever energy he summoned was fleeting. Walsh would struggle to stay on his feet in the moments after his last great triumph before crumbling into his son’s arms.

The rest of the men in the locker room were celebrating a title, but the brilliant coach, so terrific and tormented, was celebrating his survival: There would be no more losses.

“It was like a picture of a great general returning home and collapsing into the arms of a family member following the last battle of a long war,” Leef said. “There was nothing left.”

Eric Branch is a San Francisco Chronicle staff writer. Email: ebranch@sfchronicle.com Twitter: @Eric_Branch