1. Use the "Aegis of Protection" item to protect your city from being attacked for a period of time (does not protect troops outside the city).
2. You can withdraw troops that are collecting resources if they're under attack.
3. You can send out troops to avoid casualties if your city is under siege.
4. Use "Advanced City Migration" items to flee hostility. Your enemy will be temporarily unable to discover your new location.
5. Build an Asclepeion and enough Wards to prevent your troops from getting killed in battle. In this way, you can send wounded troops back to the battlefield quicker and for much fewer resources.
6. A League is always a powerful form of insurance. Your allies can send reinforcements to garrison in your city. Your allies can support you more easily when your city is located nearby.
7. After you build the "Hall of Ares", you can send a "ghost assembly" to protect your troops. The troops you put in assembly preparation will not join any battle. You can cancel the assembly before they start to march.