I'm taking it that here you are referring to 'historical' fiction rather than 'historic' fiction, yes?
Modern authors writing works set in the past should pay due care and attention to the language they use, and as you say, there are ways to avoid using offensive terms. Amusingly, as far as I am aware, the character Leroy in Cornwells' 'Sharpe' novels is the son of a Virginia planter, who talks about slaves, but never mentions the 'n' word, while the all the characters freely, constantly and realistically refer to the French as 'Frogs' or 'crapauds' -are we talking double standards, here? In any event, the last thing a working authir needs to do is alienate a potentially large portion of their audience, right? So if we can put up with WW2 soldiers, 1960s admen and British aristos from 1912 to 1926 who never light a single cigarette, we can cope with fictional slave owners who don't use the 'n' word!
However, works written by authors in times gone by - many of which are accounted classics - are a separate issue. These people wrote as they did, in the terms that they did, because they knew no better. It would be a disservice to both the author and the readers to bowdlerise these works in the name of political correctness. That said, such works should be read, and taught, with a full awareness of their context, and certainly not read out in classes to young children.