It goes back to at least 1542, so I can confidently say there are no racist origins in the expression.
Apparently it first appeared in English in Nicolas Udall's collection of Erasmus's aphorisms - translated in 1542, but ultimately deriving from Plutarch's Moralia in the first century AD.
It's really just an observation that forthright honest people use straightforward words. I doubt the fact that "a spade" happens to be the common example has any special significance, though that obviously wouldn't have worked for Shakespeare in the related rose by any other name.
An explanation for the shift in usage between raper and rapist as shown in the OP's Ngram Viewer
If one reads the results in the OP's Google Ngram link the first three pages for 1700-1776 refer to names of authors, Raper, all spelled with a capital letter. Similar results appear for Google books dated 1777-1957. The first three pages, again, all refer to people named Raper, spelled with a capital letter.
In order to find an early references to raper (spelled with a lowercase letter) and not the result of some OCR error (paper, taper and even super were among those I found) one has to start looking through books published in the 20th century. One of the earliest instance of "the raper" I found was in a poem written in 1914 by Arturo Giovannitti, entitled The Walker
I, who have never killed, think like the murderer; I, who have
never stolen, reason like the thief; I think, reason, wish, hope,
doubt, wait like the hired assassin
the embezzler, the forger, the counterfeiter, the incestuous,
the raper, the drunkard, the prostitute, the pimp, I, I who
used to think of love and life and flowers and song and
beauty and the ideal.
While I agree that raper and rapist mean the same thing, and there are instances of usage of the former; rapist with its suffix -ist, is and has always been the much preferred one. The instances of raper which clearly mean someone who forces another to have sexual intercourse are limited and not nearly as frequent as suggested by the OP's original Ngram chart but are more accurately reflected in the one below, dated 1900-2008.
Finally, one more graph showing the importance of a capital letter. Does this result suggest that the term, Raper, is much preferred? No, it doesn't.
References
When OCR Goes Bad: Google’s Ngram Viewer & The F-Word
Example of an OCR error super misread as raper
The Walker, a poem by Arturo Giovannitti
Ngram Viewer a raper/a rapist/the raper/the rapist/rapers/rapists
Best Answer
I've not heard the word applied specifically to autism, but all euphemisms tend to be replaced by newer ones. Each in its turn comes to be more closely associated with the thing it’s trying to distance itself from, and so a less direct expression is required.