There are some expanding polyurethane foam type sealant products that are supposedly listed for direct contact with electrical wiring and cable jackets. I haven’t tried it myself, but apparently the Hydra-Seal brand can also be easily removed for future rework.

Hydra-Seal