Are aluminum electrolytic capacitors suitable for encapsulation/potting?
Here are some cautions from TDK:

Seems like partially potting a capacitor with a top vent (letting the top part poke out) may be acceptable.
Be careful about the temperatures, PU potting compounds are exothermic when curing and can get very hot.