Stitching for bag - straighten UV map and make the texture even along a tube

Hi I need some help with making some stitching as in this render on the edge of the bag near the zipper (red stitching).

Image

this time I have to do a more complex object so I’m looking for ideas on how to do it.

On this image it’s just a thin plane extruded and scaled from the edge of the top leather part. Then UV mapped with a black-red striped texture. This was really too difficult since the stitching has to be evenly mapped (1mm hole + 2mm thread).

So any suggestions?