Some great info in this thread.
They could have even made it a patriotic initiative: Write a list of necessary parts available at the local hardware stores and distribute it to every family in the South. For each submachine gun built and given to the Army, the family will receive special rewards.
Adults can get the parts from stores and machine/forge/craft them to fit.
As Bubba has shown us all this doesn't work out well.
Look into what happened when Mao pushed China to increase steel production. I think in 1978. Disaster. People melting down iron pots in home furnaces that made worthless steel then having nothing to cook in. 35 years later and they made it. I do think the Confederates could have manufactured the guns in numbers that would have been significant though.
I agree with all the sentiment the problem was the cartridge not the powder. I could likely manufacture a full auto carbine from items and tools that just happen to be available in my house or most others in the US at the moment(not from guns I already own). The hardest part would be the spring, but I am sure I could find one suitable around here somewhere.
Cartridge cases? Smokeless powder? Nowhere close.
People underestimate the absolutely devastating effects of canister, especially against massed formations. A smoothbore cannon can nearly keep pace with a LMG when it comes to volume of fire measured by individual projectiles. I have oft wondered why no one seems interested in them these days.
On Gettysburg, I agree with the sentiment it was lack of contact with J.E.B. Stuart and Lees inability to adjust. Nothing more complicated. Lee became accustomed to Confederate cavalry running circles around Union cavalry troops and bringing him solid info. You can't be aggressive successfully without good information. Lee didn't have any information.