You know "honky" was really short for Hungarian. African Americans first used that word (or "bohunk" too) to refer to unskilled eastern Europeans they had to compete with for factory jobs in the early 1900s.
I don't get the connection to African Americans. I suspect that a possibility is White Drivers in the old south used to honk their horns to frightened African Americans walking on the street because they could not afford cars.
The word honky has a debated origin, but it is generally believed to have emerged as a derogatory term for white people in the early 20th century, particularly in African American communities. One common theory traces it to the slang term honk, meaning "to blow a horn," and suggests it may have originated among black workers in urban areas who associated it with white men who drove into black neighborhoods, honking their car horns to solicit sex workers. Another theory connects it to the word hunky, a term used in the late 19th and early 20th centuries to refer to Eastern European immigrants, particularly Hungarians, Poles, and other Slavic laborers. Over time, hunky may have been adapted into honky as a more general term for white people. By the 1960s, honky was popularized as a racial slur through its use in civil rights-era rhetoric, comedy, and pop culture, particularly in the works of comedians like Richard Pryor and on shows like The Jeffersons.
It could also be from honky tonk. Honky came to be used in the 1940's. Honky tonks was a term applied to bars that offered entertainment in the late 1800's. These establishments were usually lower classed and the clientele were lower class also. In today's terminology they would be considered to be rednecks. Most of those people at that time were definitely racist.
The way I heard it back in the 70s, from black buddies and acquaintances in the military, the word came from some black folk claiming white peope sound nasal when we talk. We "honk" like geese, relatively speaking. This was from multiple sources at different times. After hearing that, I considered it just another way to put people down. Haven't heard the word from anybody in decades, literally. I live in the south, FWIW, in regular contact with black neightobrs, co-workers, extended family, etc. Nobody really likes that word.