That’s a strange association. Check out this list of covers on youtube.
Of course the blues can be traced back to those days also and the comparison to rap or hip-hop caught my attention also. That song was written before 1924.
The song In the Jailhouse Now was written by [Traditional] and was first recorded by Whistler acc. by His Jug Band in 1924. It was covered by Memphis Jug Band,
But considering that but for technologly a lot of rap would not sound that different. Stripped from experience, a lot of these folk songs speak of personal and social poverty, hardship, and sometimes love.
Jazz, which includes all these forms of expression, basically has these fundamental laments as the foundation for the Blues. Rap is the modern (much more sophisticated) way of tellin the same stories as the “juggers”
This song is combination of many styles and variations on a theme.