perhaps he just needs to learn to train in different environments so conditional factors dont bother him so much in the future?
He did train in higher altitudes pre-AO to "boost" his fitness. But what happened at the AO showed that his preparation is obviously not sufficient.
Ultimately, tennis, as in most other things in life, is about performance and not potential.
There is no yardstick for the latter. So there is no use talking about what coulda shoulda woulda been.
Djokovic has to overcome the big hurdle of his Ego before he can realise more of his potential and better his performance.