The fact that the N word doesn't even follow this pattern tells you it's a totally unrelated slur.
https://starwars.fandom.com/wiki/Clanker
Every time they say "clanker" in the first season of The Clone Wars https://youtu.be/BNfSbzeGdoQ
EcksClips When Battle Droids became Clankers (May 2022) https://youtu.be/p06kv9QOP5s
More likely, I imagine that we all grew up on sci fi movies where the Han Solo sort of rogue rebels/clones types have a made up slur that they use for the big bad empire aliens/robots/monsters that they use in-universe, and using it here, also against robots, makes us feel like we're in the fun worldbuilding flavor bits of what is otherwise a rather depressing dystopian novel.
This is Goebbels level pro-AI brainwashing.