Familiar actors and stories might help, but also things that are clever and artistically memorable (e.g. Hamilton) have got to help.
I'd also be interested to know how many shows start off-Broadway or off-off-Broadway (100-500 seats and below 100 seats as per this article), and move up to the bigger theatres: test a show in a smaller venue, see if people/critics talk about it, let supply build and keep production costs capped.
Some might argue - especially for musicals - that you can't produce "good" shows without much less in the way of production costs, but I think that could be a fallacy. I've watched enough shows and plays to know when one has good "bones" that could be enhanced with bigger sets, better actors, etc. and which are going to die no matter what you do.
Hamilton would have been getting talked about and supply not meeting demand if it was Lin-Manuel Miranda in a backroom of a bar in a frock coat, a small band and some acting students making up the rest of the cast. The bones are so good on that show - it's clever, musically arresting, compelling story arc, memorable performance from himself - that anybody who would have seen it would have told their friends about it the next day.
Some shows need to be big at the start, but they already have "built-in" audiences: Lion King trades on childhood memories of the film, it's not hard to see why it would be a success.
Spider-Man which the article touches on was always a bit of a gamble: it has built-in audience, but how many people think of the Spider-Man films _fondly_?
Contrast with Back To the Future which I saw premiere in Manchester, UK (the toughest place to test a show in the World perhaps), before lockdown, and it's moved to the West End and I'd predict is going to be huge on Broadway. Great bones, great built-in audience who love revisiting the film and story repeatedly.
Perhaps I'm in the wrong industry, but this seems so, so much easier than software businesses...