Machines can print textiles, cut fabric, and fold clothes. But it’s hard to train them to sew as fast and precisely as humans.