At hackaday someone mentions using 3M ScotchCast successfully in the context underwater robotics up to depths of 5000 meters. Perhaps this could be also be useful for encapsulating flashlight drivers.
I also found an interesting theoretical reference:
Goosey, M. 1999. Plastics for Electronics (2nd edition).
DOI 10.1007/978-94-017-2700-6. It is also available on Library Genesis.
Especially Chapter 6. “Materials for advanced encapsulation” seems interesting.