Painting a flag without paint bleeding
Your best option for "precision" may be a craft known as batik. It involves applying melted wax onto the fabric in areas you wish to remain clear of the color currently being created. This effectively creates a stencil for the portion to be colored. Either paint or dye would then seep into the fabric.

The wax is then removed/washed out and new wax applied over the recently colored areas as well as any others to reject the latest color. As with many things organic and not particularly technological, you will get some less-than-perfect lines, but very likely much cleaner than with paint and tape.

I'd known of the process since my early years (so last century) but other than admiring others' work, never explored it. Your query and my resultant searches have me astonished at the development of the craft. Rather than drop a handful of links here in the forum, I suggest that you use your favorite or perhaps your second favorite search engine for "batik methods" and/or "batik supplies."

I'm going to pursue some of the links for my own entertainment. Another tool for the toolbox for me!