Completing an AAR, (After Action Review) is now  widely practiced, effectively a commercial post mortem after any major commercial activity. Completing an AAR has been standard practice for a long time after a capital expenditure, generally called something else, but it embodies the notion of learning from the mistakes, and successes to build capability the next time.

How much better it would be to conduct a formal pre mortem?

Project yourself into the future, a year, 2 years, whatever is appropriate, and assume the project you are considering has gone pear shaped, then conceive of all the ways in which this may have happened, and what the better option may have been. In other words, conduct a “Pre Mortem”

It seems to me that a rigorous pre mortem may be a pretty useful way of avoiding mistakes in the first place, better than having to learn from them.