Compare movie production estimation. There are companies which will sell a film production a completion bond. The bonding company guarantees that a releasable film will come out, or your money back.
Here's an overview of completion bonds.[1] A completion bond costs about 2% of production cost. It's typically used for indie films with budgets between US$3 million and US$70 million. The completion bond company will cover some overrun, but if it's too big, they will fire the director and take over the production. That's what gives this real teeth. Movies where this happens tend not to be great, but tend to break even, so everybody gets paid.
So how do completion bond companies do estimates? History. They have the actual expenses from many completed films. This info is at a highly detailed level, with costs for each shot. So, when they get a script with a car chase scene, they go to their database, look up "car chase", and pull out how much the last hundred movie car chases cost. They also have info about directors, producers, and actors, and how much they tend to cost to shoot a scene relative to their peers.
It's not rocket science. It's insurance underwriting.
[1] https://www.mediaservices.com/blog/how-to-bond-a-film-a-defi...