> Would you nationalize factories but leave them idle?
Yes. Historically, these would be the national armories, Navy Yards, and Air Force plants. You know, Springfield Armory (of .30-06 Springfield fame, now a museum), Watertown Arsenal (now a fucking Home Depot, among other things), Charlestown Navy Yard(Boston, now largely a museum), Philadelphia Navy Yard (redeveloped? not my area), Air Force Plant 42 (near LA, still in use by Skunk Works among others), and others.
Having the capital idle/underutilized but maintained and a core group of people with the institutional knowledge ready to pass on during that rapid scaling up is what would make the factories able to scale up. Gun barrels (of all sizes) are relatively specialized from a manufacturing standpoint. Nobody is seriously arguing for having capacity to scale up to build 16" guns for battleships, but 5" guns are extremely common in naval use and 155mm guns are common for artillery. Being able to surge production of those without having to go through a learning curve would be a really great ability to have.
Interestingly, Goex, maker of black powder, is located on a military facility (Camp Minden) because that process remains both hazardous and surprisingly relevant to modern military use.