The Volokh Conspiracy -: "With respect to the mechanical issue, the invention of a practical and commercially successful sewing machine comprised ten complementary elements. These ten elements were first explicitly identified by Andrew Jack in an oft-cited 1958 article: (1) the sewing of a lockstitch, (2) the use of an eye-pointed needle, (3) a shuttle carrying a second thread, (4) a continuous source of thread (spools), (5) a horizontal table, (6) an arm overhanging the table that contained a vertically positioned eye-pointed needle, (7) a continuous feed of the clothe (synchronized with the needle motion), (8) tension controls for the thread that give slack as needed, (9) a presser foot to hold the clothe in place with each stitch, and (10) the ability to sew in either straight or curved lines. The first sewing machine to incorporate all ten of these elements was the famous “Singer Sewing Machine,” which was first sold to the public in the fall of 1850. But Singer was neither the first person to invent all ten elements nor was he the first to patent them."
Well, you also need good metallurgy, some basic mass production skills, consistent thread creation and of course lots of relatively inexpensive fabric. Then don't forget a social and political structure that allows you to do all the work and make a profit.
The essential part of the sewing machine is the needle, that is where all the action happens, you need to make consistent and strong needles and consistent and smooth thread, if the hole is he wrong size the thread won't go through and if the thread isn't consistent it will either bind or break.
If there was a sudden collapse of civilization, it would be smarter to loot a craft store for pins, needles, cloth and thread then a grocery store for food, mainly because they would be really hard to start making again locally and wouldn't be a priority.
We have a very old sewing machine we got from my wife's mother, who got it for a wedding present. It is so old that it has an external electric motor bolted on. That is one piece of kit that we want to hang on to because it is very easy to convert that to some other form of power like a treadle pedal which my Oma in East Germany had so I have a good idea of how to make one.