They were changed from African pygmies in later versions of the book. You can still find early copies which describe them explicitly as such:
Willy Wonka tamped down speculation that he made them of chocolate. “They are real people! They are some of my workers!” He advised the group that these tiny black people had been “Imported direct from Africa!” They belonged to “a tribe of tiny miniature pygmies known as Oompa-Loompas. I discovered them myself. I brought them over from Africa myself—the whole tribe of them, three thousand in all. I found them in the very deepest and darkest part of the African jungle where no white man had ever been before.
That's literally their backstory in the novel afair.
I have read that the Oompa Loompas were originally just black people and even for the time the publisher thought that was a bit much.
They were changed from African pygmies in later versions of the book. You can still find early copies which describe them explicitly as such:
The illustrations in the original book were very...um... politically incorrect.
Jesus, there are people that just need to shoehorn in some moralizing in every goddamn thread, isn't there?
Thanks for that hot take.