I'm quite keen on using hot melt glue for sticking and encapsulating electronic things and thought I would do an experiment.
I took a 10M metal film resistor, cut the leads short and soldered a bit of ordinary PVC hook up wire to each.
I then coated the resistor, joints, and a bit of the wire with hot melt glue. Just generic semi-transparent hot melt stick.
I took a jam jar and poked two holes in the lid, threaded the wires through and sealed each side of the lid with more hot melt glue.
I half filled the jam jar with a saturated solution of table salt and stuck the lid on with the resistor submerged. The resistor measured 10.123M at the time.
The jam jar has been sat on a window ledge getting daylight and a little direct sun light for the last 23 months. I gave it an occasional shake.
It hasn't leaked, the lid seal is intact. The hot melt glue seemed to decompose a little. It seems thin layers from the surface detached and are floating in the solution. The lid has gone rusty so the solution is brown with a bit of brown scummy decomposed or detached hot melt floating it.
The resistor measures 10.087M today (and probably a bit more if it were warmer here). .
I an pretty impressed. The glue has kept the solution off the resistor and the seal between glue and hook up wire has held up as has the seal in the lid.