In 1971, even as his breakthrough hit, “Ain’t No Sunshine,” soared to the top 10 of Billboard’s Hot 100 chart, Bill Withers had a backup plan — he was still employed at an aircraft parts company where he made toilets for 747s. The cover of the singer’s debut album features a grinning Withers leaning up against a brick wall holding a lunch pail. As noted in a 2015 Rolling Stone profile, the photo was taken on his lunch break at the factory.

Withers, who died March 30 of heart complications, had a notably brief recording career for someone whose work has become so ingrained in the American songbook. He largely stopped recording in 1985, leaving his soulful songs to be reinterpreted by other artists or featured in countless poignant and pivotal scenes on screen. One of the most interesting aspects of his career is that it started, essentially, on a whim.

“I lived a good portion of my life before I started to play music,” Withers recalled in “Still Bill,” the 2009 documentary about his life and career. He was in his late-20s when, as he told Rolling Stone, he bought a secondhand guitar after seeing R&B singer Lou Rawls perform at an Oakland, Calif., bar. But it wasn’t necessarily musical inspiration that motivated the former Navy aircraft mechanic’s purchase: the bar manager had groused that Rawls was late despite being set to earn $2,000 from the gig. When Rawls finally arrived, women flocked to him. “I was making $3 an hour, looking for friendly women, but nobody found me interesting,” Withers recalled.

That changed quickly after Withers taught himself to play the guitar and began writing songs in between factory shifts. He saved enough money to record a demo and began shopping it to labels before landing at Sussex Records, the now-defunct company that would release “Just as I Am” and two subsequent albums. He was laid off from Weber Aircraft ahead of his debut album’s release, but his luck had changed dramatically by the time “Ain’t No Sunshine” peaked at No. 3 on the Hot 100 that fall.

“It’s funny because I got two requests in one day,” Withers mused in “Still Bill.” “I got a letter from my job saying that I was called back for work. And I got a request to do the Johnny Carson show.”

When Withers made his “Tonight Show” debut in November 1971, Carson — like many other figures who would interview Withers over the years — wanted to know about the singer’s previous profession. “You were a craftsman, you make johns —— toilets, right?” the late-night legend asked.

“Oh yeah, it was a good job. I had a lot of fun doing it,” Withers replied to audience laughter.

His foray into the entertainment business necessitated some adjustments for the Slab Fork, W.Va., native, who was open about struggling with a stutter well into adulthood. “New words started to enter my life that had never been there before, like ‘handsome,’ ” Withers said in “Still Bill.” “Boy, you sure do get better looking when you get a hit record.”

The next few years brought even bigger hits including the chart-topping “Lean on Me,” which was inspired by the coal town that had raised him. But Withers grew frustrated after landing at Columbia when Sussex Records folded in 1975. There, he was forced to work with executives who racially stereotyped him (he recalled one A&R exec suggesting he cover Elvis’s “In the Ghetto”) and attempted to stifle the creativity that had led to his unconventional early hits.

The question for Withers, he explained in “Still Bill,” became: “Can I still stay in this business and be effective and make a living and not have to play this fame game? I wasn’t any good at it.”

Withers’s discography flourished long after he retired from performing, but he opted out of the spotlight in favor of spending more time with his family. “I can make a record if I want to, but I’d rather spend the time home with my kids and snuggled up under my wife. It’s warm in there,” Withers told The Post in 1991 ahead of a stint at Blues Alley.

“One of my favorite quotes is from Louis Armstrong,” Withers added. “ ‘Better a has-been than a never-was.’ ”

Nearly 25 years later, Withers appeared to have no regrets. “This business came to me in my thirties. I was socialized as a regular guy,” Withers told Rolling Stone. “I never felt like I owned it or it owned me.”

Read more: