I'm inclined to think that putting down peanuts will simply encourage badgers, and other animals, to use your garden as a regular feeding station.
How many peanuts would you need to put down, so that a badger, and his wife and kids, would be fully satisfied, and do no further foraging - a few handfuls?
Peanuts are not cheap. Do you really want to commit yourself to such an experiment, indefinitely.