This short plugin provides you with the following features:
Treat a Win as a Loss
Treat an Escape as a Loss
Set the appropriate value of SWITCH_NO_WIN and SWITCH_NO_ESCAPE to the right Switch ID and turn on any of those switches before the battle begins (confirmed) or as part of a Troop page (untested).