You guys got great points, lets address each of them:
The ray gun, though we have had the concept since the days of HG Wells, would present a real difficult problem to actually build. Because we do not have the power supply, containment system, and delivery system for such large amounts of destructive and ionizing energy.
The submachine gun on the other hand? The materials needed to build them are already there in 1861. Got cartridges? Check. Got plumbing parts? Check. Got metallurgy knowledge and guys who know how to operate machine tools? Check.
Agricultural economy: The blowback submachine gun would have been the most practical weapon to be fielded for the South at that time. The main issue is that the Confederate raiders are capturing a far larger amount of cartridges than the rifles that use them. Henrys and Spencers are rare spoils of war. But their cartridges are transported by the wagonload and captured by the wagonload.
The South may not have had the technology to mass-produce a Henry rifle. But they sure have the materials and technology required to build a weapon like the PPS-43 or the Sten. 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.
Children who are not in school can spend the whole day at home putting parts together. Teachers at school could make it a fun project for all children: Your country needs you! Whichever group assembles the most guns from these parts in this crate shall receive one writing assignment less today!
Adults can get the parts from stores and machine/forge/craft them to fit. It would be a true People's War. Everyone pitch in and help defend their country in every way possible.
And finally, the heat and fouling issue? True, BP produces a lot of fouling, especially in automatic weapons, but the soldiers can be instructed to use firepower for the maximum effect at the beginning of a volley. Even with fouling accumulation, the guns can fire at least 2 or 3 or even more magazine-loads before they start jamming up. Or, if the South start manufacturing sulfurless black powder, the fouling issue can be eliminated altogether and the guns will be just as effective as the modern smokeless automatic weapon.
Imagine a Yankee column trundling along a heavily forested road. Suddenly, 100 Confederates hiding behind trees and behind ravines open up with automatic weapons at once. Each soldier has a 30-round magazine and each weapon is firing 600 rounds per minute. The amount of fire saturating that Yankee column would be truly catastrophic. And at that time, most young men knew how to shoot accurately, so deadly accurate AUTOMATIC fire would take a serious toll on Yankee numbers. And when the guns start jamming from fouling, the CS troopers can simply fall back into the woods and disappear.
They will spend some time in hiding, cleaning their weapons, reloading their magazines, and in a few hours they will be back in combat, with freshly cleaned and loaded weapons, ready to deliver more withering sheets of lead.