I've never heard the harmonica joke, but I've run across the concept in fiction from the 1940s (artfully relayed so that they convey the idea without being gross and explicit). Those sources treated it as an old joke, and an obviously ridiculous one. I don't think any of these took it at all seriously, or intended it as racist -- if anything,. it wasd a comment on the gullibility of the Americans who would believe such a stupid idea. (And, out of curiousity, how is believing this "racist"?)
"Mr. Chambers! Don't get on the ship! We translated the book, and it's a TENNIS MANUAL!"