Is there an expression to describe the act of thinking about all the possible scenarios that might happen? For example, an army general might envision possible attacks from the enemy in order to come up with a response plan. The Pentagon might run simulations to identify security weak-points to our infrastructure. In business, one might think about various possible actions and play them out in their mind or conduct a thorough analysis. The end-goal for this type of thinking process is typically to predict what might happen and decide what the next best action is. Is there a term for this, like war-gaming?
a plan that is made for dealing with an emergency, or with something that might possibly happen and cause problems in the future:
a contingency plan for sth/doing sth Companies wishing to apply for a hazardous waste transporter license must submit a contingency plan for responding to any type of incident.
The report says there was a lack of contingency planning for a crisis in London's markets.
A common expression, probably enough of a 'set phrase' to include as an 'answer' is
plan[ning] for every eventuality.
I haven't found it in a list of set phrases, but ludwig.guru's site lists some examples of it being used.