For any prominent thinker's warning of disaster to be wrong is the best possible outcome for society, if reform explains the discrepancy between forecast and result.
The bold part is an infinitive clause, the subject of "is the best possible outcome for society..."
It uses a "for-to" structure.
A simpler example of that structure:
For me to go is inconvenient.
The word "for" is an addition to an infinitive clause that happens to have a subject. The word "for" marks the subject of the infinitive.
There is a mention of this structure, called for-to complementizer, in the single answer to this question:
Stack Exchange ELU
To is part of the for-to, or "Infinitive" Complementizer; for marks the Subject, to marks the VP.
[Bold emphasis added.]
So, the word "for" marks the subject of the infinitive clause, in your example, "...any prominent thinker's warning of disaster...", or more simply, "warning", while "to" marks the infinitive verb "be".