If you get a bigger box you could put the food in it as well. In which case you would need to build something inside the box to hold the battery still, keep it from crushing the food.
There are cheap imitation Givi locking topcases for motorcycles. Here's one that is 30 liters:
https://www.amazon.com/Yescom-Motorc...dp/B01MF5S1S4/
This would look weirdly large on a bicycle but if it makes your life easier who cares?