Is capacitive sensing possible with batteries?

You don't want the PCB on the bottom of the lid to have too much capacitive coupling to it.

I would not glue it to the bottom of the lid. Instead, I'd put it so the circuit is sandwiched between the lid and a metal piece under it. Although a ring around inside the jar would be better than that.

It is about having your conductive hand shorten the path that the electric field has to take between the pieces of metal.