Here's what you need to do:
1) Make sure that software-delivered idea is novel, useful, fits a strong need, and is going to be usable easily.
2) Hire the smartest developers you can who also are friendly and have a good work ethic.
3) Have a good process (e.g. OKRs) for ensuring focus (prioritized but adaptable focus).
4) Have a good process for exploratory development and iterations/sprints with re-prioritization after each version.
5) Have a good process for eliminating technical debt as you go.
Then you just have to trust that you'll get the best thing you could have got, in the time and money you allocate.
You have to hope that it's good enough to be a minimum viable product. If not, you simply couldn't afford to put together a software product in the first place, and no amount of estimating would have changed that.