Sometimes the law is not what we think it should be. Sometimes the law does not produce justice.
Yeah, legal logic is found in a different universe.
But.... Hot sauce placed on anything in a food cache, or lunchbox, could not be considered a booby trap because it is a food. I suspect peanut butter couldn't either unless you purposely disguised it and presented it with an intent to do harm.
I would think a food cache placed on public land with a note attached identifying the owner and date of placement, if not already illegal all on its own, could never be considered an attractive nuisance. But that's just my take on the logic, I'm not from that different universe.