I wouldn't call it a "formal" phrase; however it is well-known, and widely used.
It is used in newspapers, and not just downmarket tabloids - this article from credible business journal The Financial Times uses it in a headline.
If you search the expression on Google Books you will also see that it is used, not just in creative writing, but in many "serious" books on business.
Is that formal enough?
Phrases or sayings which could be used to make the same implication include:
- An accident waiting to happen.
- A bad combination
- Heading for trouble / disaster
However, "a recipe for disaster" really brings together the two ideas that a combination of factors may lead to a disastrous result.