I suspect that the lyrics in the DT represent someone's recent attempt to make a semi-coherent story out of a bunch of random "filler" verses to a fiddle tune. As far as racist content, it seems to me that it lies solely in the phrase "had a man". Change that to "knew a man" and there ain't nothing to offend anyone (except, possibly, adulterers).The opening verse I heard first was:
Hold my fidle; hold my bow
I'm gonna kick hell outa Cotton-eyed Joe.