I'm not sure if this is exactly what you're looking for. But it might be helpful.
Simon Thommes of the Blender Studio was showcasing a "stitch generator" with Geometry Nodes recently. The following node setup was replicated from the nodes shown in the video "We can do that with Geometry Nodes...". (Update: download link to the shown demo file.)
The modifier uses an input curve, then
- resamples it to create even distributed control points
- the Filet Curves node adds a few more points to smooth curve corners
- then it creates a "thread" from a curve
- and finally "stitches" the "threads" along the curve with some randomness for the thread length and rotation
When you edit the curve you can change the radius in the side panel to make the stitches larger or smaller (see screenshot 1).
The setting Step Size is how many threads you want to have on the curve. Smaller values result in more threads.
Length Fac is a factor for the length of the threads (=width of the embroidery) and Height is a factor for the height of the thread curves.
Last but not least, there are two more little modifiers to convert the curve into a mesh and to set the material.
Update: Meanwhile you can download the file shown in the video at blender.org - Demo Files. It's the Sample UV Surface
Demo by Simon Thommes.