Should it consume the Pokesnax only for a certain kind of events?
If the event type is "The wild pokemon attacked", then you defend yourself and either the wild pokemon faints or lands in a Pokeball. In both cases you defended the backpack, so none should be lost. [*]
On the other hand, if the event type is "You hand out a Pokesnax and directly obtain the wild pokemon", the Pokesnax should obviously be consumed.
[*] Idea for a hidden mechanic: If you happen to lose the battle against a wild pokemon that attacked for food, you should hand out the Pokesnax as you black out.