Thanks David and Graeme for your detailed comments and advice. Since I need my masts to be easily fold down, I plan to make tabernacles. The idea is shown in the sketch attached. As you can see, the bury is sufficient - over 10%, as minimum required.
Lower part of the mast will be made of wood, with square section in the tabernacle, blended right above the hinge to the round that will go into the aluminum mast. It seems to be logical just extend this plug above the gate cutout, however it is not that simple as there are some parts welded inside the mast - as shown in the picture.
Now I think I could chisel out a groove in the plug extension, and when inside fill it with thickened epoxy, then put the door back.
The other solution is an aluminum pipe sleeve or glass-epoxy belt over it. The first one is elegant but heavier.