“An apple a day, if well aimed, keeps the doctor away.”

I was speaking in P.G. Wodehouse quotes with my eldest son, Nick, who was in hospice, where he was being treated for cancer just days ago.

“Here’s one for you,” said Nick, laughing. He had surmised that, after bulletins from New York, his father, as Wodehouse might have put it, was less than gruntled. “Has anybody ever seen a dramatic critic in the daytime? Of course not. They come out after dark, up to no good.” We hugged and said our goodbyes.

The next day, my son died. Nothing’s worse for a parent than the death of a child. In my bones I feel it wrong to write about the closing of “Phantom” or where Broadway’s going right now.

But I’ll try. I owe everything to my love of Broadway and its glorious legacy of musicals. So everything I write comes from my childhood dream that I’d make it to the Great White Way.

All roads lead to my late friend and collaborator Hal Prince. My association with Hal goes back to 1970, when he sent me a telegram proposing that he direct and produce “Jesus Christ Superstar” on Broadway. It got to me only after the show was already committed. Hal knew of my regret, and we kept in touch.

Cut to 1975. Hal had just triumphantly opened “A Little Night Music” when “By Jeeves,” the Wodehouse musical for which I wrote the music, bombed in London.

Hal wrote to me when I was at my lowest. The letter contained his mantra. He said he liked my score but “you can’t listen to music if you can’t look at it.” The sets for “By Jeeves” were as hideous as the ones for “Night Music” were gorgeous.

Later, he gave me half an hour in the Savoy Hotel bar. His parting line: “Never be afraid of composing good and brave new work, Andrew, and never be afraid of failure.”

In 1978, Hal directed “Evita,” which then went to New York and, despite horrendous reviews, became Tim Rice’s and my first proper Broadway hit. Afterward, Hal and I met regularly. Even if our shows were very different, our agenda was the same: our love of theater and Broadway. Hal saw “Cats” in previews in London. I still have his notes.

Cut to 1985, when we met at the cocktail party for Tony nominees at the Plaza Hotel. The staff was on strike, there was no chance of the show Hal was nominated for remotely winning, and we ankled elsewhere. The conversation, as I remember it, flowed much as follows.

Me: Hal, would you ever direct a high romance?

Hal: Kid, are you thinking about one?

Me: Yes, ever since I saw “South Pacific.” Jesus, cats and an Argentine dictator’s wife haven’t hit the spot.

Hal: Nor have mine. Go on. …

I explained I’d just read a book called “The Phantom of the Opera.” How had I thought that, buried in a novel that couldn’t decide if it was a detective or horror story, Svengali or Trilby, there was the perfect subject? Then I said I wanted the theater to resemble a disused opera house whose chandelier would rise from the stage as the building returned to its former glory.

Hal said, “Go write the music.”

Cut to this past weekend. The 35-year Broadway run of “Phantom” has come to an end. It’s a personal loss to see the close of this wonderful creation, the last Hal Prince production on Broadway, with its almost 30-piece orchestra and one of the grandest designs that have ever been seen in the theater. The irony is that this past season was its best ever. Perhaps it will rise again.

Is this the end of a Broadway era? No.

For openers, the era of the big original Broadway musical ended long ago. Massive hits such as “Hamilton” and “Phantom” did not originate on Broadway, unlike “West Side Story” and “Fiddler on the Roof.”

Who is taking a risk, as Hal did so wonderfully with Stephen Sondheim? Am I wrong in fearing that a great work like “Pacific Overtures” could not debut on Broadway today unless there was a stage-struck sugar daddy lurking in the wings?

It can cost today $5 million to produce a play in a small Broadway house. Few plays can recoup this, even if ticket prices are astronomical.

Even a medium-scale musical today can cost $18 million to present. The weekly running costs of “Phantom” prepandemic were about $850,000; the additional requirements of the pandemic era pushed it to almost $1 million, and that’s with minimum royalties going to its creators.

No wonder musicals now feature small casts and minimal sets. No wonder producers turn to jukebox musicals with song catalogs everyone knows.

No wonder young creators turn to writing for anywhere other than Broadway to make a living.

I truly don’t know the answer to the ever-daunting challenges of producing Broadway musicals. But I do know that all of us who believe in Broadway must knock our heads together if we care about the kind of future it will have. Shows like “The Lion King,” “Hamilton” and “Phantom” are the exception, not the rule.

First, ticket costs. The average is now around $130, unaffordable for too many people. Add to that significant markups from the digital sale platforms with which theater owners enter into contractual arrangements.

The theatergoing experience must be improved. You cannot, in 2023, have audiences in desperation searching for restrooms during the intermission in a bar across the street in the pouring rain.

The theater unions must also help. It’s hugely in their members’ interests to ensure a healthy, vibrant Broadway. The way multiple union contracts drive up the costs of Broadway shows is unsustainable.

But there is, sadly, an all too likely scenario. Broadway, unlike London’s West End, is a worldwide brand name, inextricably linked to New York. So if you want to establish a brand, having a show on Broadway is like renting an expensive loss leader storefront on Fifth Avenue or London’s Oxford Street. OK, your brand will lose money, but it has to be there to ensure a successful worldwide rollout.

Please, no.

This has been a season of goodbyes, personal and public. With the curtain now fallen in New York on the musical that has been the biggest of my career, I passionately pray that Broadway rediscovers the appetite for new scores and original work that made me so excited when I was, as Hal always called me, a kid.