Etymonline does not mention the use of whitewash in sport. But it is still interesting as the modern use is derived from these senses:
1590s, "to wash a building surface with white liquid," from white + wash. Figurative sense of "to cover up, conceal" is attested from 1762. Related: Whitewashed; whitewashing. The noun is recorded from 1690s.
Wiktionary and a couple of other places date the sporting sense of the term to baseball from the 1800s:
(baseball, slang, dated, late, 19th century, archaic) To prevent a team from scoring any runs.
In his book, High and inside: an A to Z guide to the language of baseball (1997), Joseph McBride notes:
To "whitewash" a team, a term that can be traced back as far as 1851, is to obliterate it, just as whitewash does to the previous coloring of a fence. The word used today is "shutout." Synonyms for "whitewash" were "kalsomine" and "calcimine," ...
Considering the fact that the first official baseball game is said to have taken place in 1846, this is remarkable.
So it appears that there are no racist undertones to the term. That said, for reasons unknown, it has fallen out of fashion in baseball and has been replaced by the term shutout.
Whitewash is still in widespread use in other sports, most notably, cricket. While I wouldn't consider the following to be racist, it is still noteworthy:
West Indies' consecutive 5–0 defeats of England in 1984 and 1985-86. These two results are also commonly labelled blackwashes because of the dark skin of the West Indies players.
Also of passing interest:
Whitewashed is a term used to describe a member of a racial minority group, often those of Asian heritage, who have culturally assimilated to white, Western culture. Whitewashed individuals know little of their native culture. The term is typically used in a derogatory manner. It's akin to calling someone a racial sellout.