In the fictional serie's fictional wild west park there is a group of former Confederate soldiers who refused to surrender and gone rogue as mercenaries south of the border, does this have an historical basis?
Sort of. They appear to be drawing from General Jo Shelby and the 132 men of the Iron Cavalry Brigade of Missouri that refused to surrender and left the US for the Mexican Empire. Though they weren't exactly the lawless rogues depicted in the show. While many of the disorganized Confederate immigrants to Mexico in the aftermath of the Civil War would eventually find themselves supporting Emperor Maximilian after being given land grants that would see the establishment of 'Confederate Colonies" like New Virginia and Carlota (named after the then Empress of Mexico), Jo and his men tried to avoid being seen as a dangerous filibuster force. They were not viewed fondly by the Mestizo population that was revolting against the French installed Emperor, so after the French withdrew from Mexico and the rebels took over the government and killed the Emperor the Confederados largely left the country. Many would go back to the US, while others went further south to the Confederate colony of Americana in the Brazilian Empire, where slavery remained legal until 1888. Source: Rolle, Andrew F. The Lost Cause: The Confederate Exodus to Mexico. Norman: University of Oklahoma Press, 1992.