The challenges of putting down a guerilla insurgency predate Iraq and Afghanistan. The best case study to consider is actually the one where Robert E. Lee doesn’t surrender the Army of Northern Virginia and instead orders them to disperse and take to the hills to continue the War ... with Joe Johnston following suit.
Had that happened, we’d still be fighting today. Lots of people play up Lincoln and to a lesser degree Grant as the savior(s) of the Union ... when just as strong a case can be made for Lee.
The Civil War was carried on by other means, according to a certain interpretation of Jesse James, the KKK, moonshiners versus revenoors, etc.
I believe that Lee was trying to get Britain to intervene, to come in on his side. Had he done what you suggest, it would have been very different, wouldn’t it?
I don’t know how that would have worked with Sherman though.