Have you ever thought of something so glaringly simple, you can't figure out how you never thought of it before?
get a piece of plastic sheeting a foot square, and tape it onto the back of your backpack so that it covers
The battery compartment. Now when you fill up there's no way water can get in there.
Just tape it across the top, then you can lift the plastic flap to get at the battery.