As homebild mentions, many painters use an edge guide; even more pro painters use nothing except a high-quality brush. I have an excellent 4" wide brush with which I've often painted narrow muntins on divided light windows with no scraping, trimming, or cleanup needed afterwards. Save good prep-work (which actually adresses a different area) nothing is more critical in quality paint work than a really good brush.
Since your purpose is striping on walls & not protecting adjacent woodwork, I'd suggest a good tape & spraying the stripes, rather than using a brush or roller.
A drywall wall, especially previously painted, will have a minute texture that even a good tape cannot totally adhere to; rollers & brushes will push paint into these minute valleys beneath the tape edges. Spraying your stripes on, then immediately removing the tape will give you a cleaner edge; still not 100% perfect, but quite good. When you first remove the tape, the edge may look slightly ragged, but as the paint is still wet, it does level itself quite a bit, and looks much better when it's dried.
One other option which can work well is to tape your stripes, then using a moderately "dry" brush, repaint the areas between the tape with the alternate color (the color behind the tape), wipe down the stripe area with a rag, then brush or roll your stripe color & immediately remove the tape. The first coat using the alternate will fill the small voids beneath the tape so your stripe color doesn't bleed.
The sharpest & cleanest line when painting alternating stripes is usually acheived by free-hand with a quality brush, but not many of us out here are "caffeine-free" enough to be that steady in this day & age. Good luck