the border can be added directly to the input waved flags SVGs like a regular path, we don't need to use PaintComposite multiply operator, regular alpha blending produces the same effect since the border is a semi transparent shade of gray.
I renamed the script colrv1_add_soft_light_to_flags.py, and modified so that it doesn't require any additional glyphs to be present; an unbounded PaintLinearGradient is built on the fly and clipped using the flag as a mask (using SRC_IN compositing mode).