I don't think it is all that difficult to convince one desparate for success that they are being successful. In fact, that is probably the easiest military deception of them all.

Clearly you couldn't just abandon your trenchs and then all hide behind farm houses and yell "surprise!" It would requires an assessment of where the enemy wants to succeed, creating impressions of weakness and small successes over time to set the stage, while covertly developing one's own counterattacking force.

It works in martial arts and small level tactics (god knows how many mounted and dismounted patrols have chased a small group into a large ambush over the annals of time).

This is an "obvious trick" that the human mind is susceptible to fall for. Kind of like telling a woman she's beautiful, listening to her prattle on, and buying her drinks. Some things work because they work.