Chosen Solution
I decided to replace a cable in my MacBook charger (old MagSafe). I cracked it open and there is a large blob of some sort of white rubberish paste filling a good portion of the space inside:
I am not sure whether it is a special filling paste or something (capacitor?) leaked. I was not able to find any obvious sorts of leakage.
The white rubbery stuff is indeed a filler, I think it may help conduct heat towards the shell so as to avoid the formation of hot spots in the circuitry. It also helps to keep the components in place, which is a good thing because power bricks are relatively prone to rough handling. Of course, it also makes the power brick more difficult to repair, but then, power bricks as a rule should be replaced, not repaired. Repair of power bricks by non-experts in particular are not unlikely to present a significant safety hazard.