Seems like a revisionist history pitched to replace the Civil War origin. Click the source link [1]. This is what it says.
https://www.ncpedia.org/naval-stores
“The phrase "Tar Heel," the nickname for North Carolinians and the state itself, possibly originated from the fact that people working around turpentine stills often got tar on the soles of their shoes, allegedly helping them "stick" to their assigned jobs.”
No evidence of the term being used in a newspaper or other publication before the Civil War.
And that’s after the link admits enslaved people were important in the production.
So either it’s a reference to enslaved people stuck to their jobs or Confederate soldiers.