is there not something in the "rules of war" which prohibit a declaration of war unless there is a reasonable chance of success.
You are thinking of the 'Just War' doctrine of the Catholic Church, as originally espoused by St Augustine of Hippo, with contributions by Thomas Aquinas and others. The clause is part of the Catechism of the Catholic Church.
I remember giving a lecture on the topic, pointing out that this clause was b#llocks and using Thermopylae as one of the examples.
.