I don’t know for sure if this is true, but I learned some time ago that your grandmother’s version, rather than being a perversion, is the original.
Here is a story from Vox that seems to uphold that idea and illuminates the racist originations of a few other children’s songs or rhymes.
By the way, I lived in Alabama as a child in the 1970s, and your story resonates powerfully with me. I knew so many women a bit like your grandmother.
Your beautiful descriptions really brought it to life for me, making the racism all the darker by contrast.