The ballad of John Henry is a folk tale about a Black man struggling against Industry.
That being said, John Henry is a hero. A real hero? Doubtful.But a hero nonetheless. The struggles at the beginning of the Industrial Age were hard. The story of John Henry is a plea for the working class to keep their jobs and be secure in human resources instead of machinery.
I would link John Henry to Paul Bunyan, Pecos Bill, and even a more local story, Joe Magarac. These stories weren't written based on fact, but on an ideal. A great hope for future generations.
Also it would be easy to call Henry a martyr. He died for what he believed in, and the story would not have been the same if he lived another 50 years. In regard to the story, we, the reader, have to know that the machine age killed the people (and specifically jobs) and that is shown in the story.
Some labor advocates interpret the legend as illustrating that even the most skilled workers of time-honored practices are marginalized when companies are more interested in efficiency and production than in their employees' health and well-being. (From the Wikipedia link.)
I dont find anything in the legend that makes me think race is an issue, at least not like man versus machine is. Henry could have been white and the story stayed the same.