There are plenty of companies that already do that (Indochino, Modasuite, Black Lapel, etc). No one who cares much about fashion believes that they will overtake a good bespoke suit any time soon.
For example, measurement is not as easy as "wrap a tape around your arm". You have to take multiples to make sure you get people as they add water weight, you have to take it at the right spot which might change for each person, etc etc. Then, machine sewing still isn't as good as hand sewing. If each pattern is different then it's difficult to automate the sewing. Lots of little changes in each suit make it tough to both automate and maintain high quality.
The skill in measurement is an entirely different skill from that of doing the sewing, however. If you had a machine that could sew as well as a human, we could have an army of measurement experts sending them to the machines, which would churn out custom-made suits.
I think the bigger question is how to automate the sewing. If we could do that, I imagine it would make it much more scalable.
I think if we can make self-driving cars we can make machines that can make a suit. The reality is that it's probably cheaper to pay people to do it.
I have a friend who orders custom clothes from China. The quality is quite high and the price is lower than non-custom clothes for sale at Nordstrom's. Who is going to spent money making a machine to do this when the human labor doesn't cost anything?
For example, measurement is not as easy as "wrap a tape around your arm". You have to take multiples to make sure you get people as they add water weight, you have to take it at the right spot which might change for each person, etc etc. Then, machine sewing still isn't as good as hand sewing. If each pattern is different then it's difficult to automate the sewing. Lots of little changes in each suit make it tough to both automate and maintain high quality.