I've written several answers on this topic before, especially this one and the ones it links to. The short of it is that there were several long-term developments (economic, demographic and military) that made Greece more capable of defending itself than ever before, but the outcome of each battle was still largely down to contingent factors rather than structural advantages.