“But the phrase, I learned several days ago, emerged in the late 19th century, around the time the US passed the Chinese Exclusion Act banning immigration from China, the country of my birth. Some white Americans popularized the saying to mock the accented, sometimes ungrammatical English of Chinese immigrants.”
I seriously doubt it. This as the same amount credence given to the story that the word picnic had racist origins. None.
The first Chinese immigrants to the US were brought here as cheap labor for such tasks as railroad construction, were from the poorest class and no doubt illiterate in their own language. They did not have the benefit of free ESL classes and had to make do (oops!) with pidgin phrases to communicate. So instead of saying “I’m terribly sorry but I can’t comply with your request to have your laundry ready by this afternoon “, they had to say “No can do.” English speaking Americans picked up on such phrases as handy, readymade replies and adopted them in turn, thus enriching our culture with yet more diversity to everyone’s benefit.
Or, to put it more succinctly, China Doll speak with forked tongue.