How many factory workers were middle class, during this heyday of which you speak
A surprisingly large number. Going back to the early days of the model T, Ford (the person) recognized that if he paid his people better than the usual factory wages, he would 1) have lower employee turnover, 2) short-circuit squabbles with the nascent labor unions, 3) increased productivity and throughput (see 1 and 2), and most importantly 4) be creating a population that could actually buy the product he was trying to produce.
More recently, during the heyday that the GP spoke of (1940s through 1970s, then declining through the early 2000s), an auto worker could expect a modest, but stable, middle-class lifestyle from his (it was mostly men) factory job. It was blue-collar, didn't require a college degree, and could support a family on a single income. The large tracts of modest homes that made up Detroit are a testament to this fact. The decline in manufacturing around Detroit has directly led to the general poverty of the city, the depopulation, the urban blight (whole blocks of abandoned homes), and eventual bankruptcy of the city.
If you can get it, the same can be said for an automotive job today, or building airplanes for Boeing. Or, until their decline, the textile industries in the American southeast or the lumber industries in northern states. There are fewer guarantees with a manufacturing job today - it may not be lifelong employment, and your prospects during retirement look less secure. Still, they are decent jobs for decent people, and (right or wrong) the kinds of jobs that cities and states climb over each other to get.