More broadly, this is a case of "right for the wrong reason". Many books mentioning slavery will be racist because many books of all sorts were racist, but we're asking whether this is informative or just a base rate fallacy.
It's true that correlation is not causation. It's true that books that use the words 'black' and 'slave' doesn't say anything about whether they're racist. Nobody in this thread was saying otherwise.
It's also true that the history we actually have is one filled with real racism and writing about real racism. It is not one that had a majority of John Brown writing about the evils of slavery. This isn't speculation, we have a historical record and this has already been demonstrated.
Bigger picture, @artursapek asked an interesting question, is a body of literature sexist if it accurately reflects society? Men do commit more crimes, is it sexist for there to be more writing about men committing crimes than women?
@zebrafish answered with an interesting answer -- we might consider it somewhat sexist because our society is still somewhat sexist. If the degree of sexism in literature and in society are the same, then is the literature sexist on it's own? Maybe it is.
Both are hypotheses, and in my book it's perfectly fine to ponder hypotheses. Neither one said something I would presume to call "wrong".