Etymologically they may be unrelated but come on. Every single time you say one of those words we all know what word people are going to think of instead, as they're way too close in spelling and pronunciation. It doesn't help those words are not commonly used at all either.
So although they technically may not be bad words, I wouldn't say them. Languages do not follow rules or technicalities. Those words just got the short end of the stick, unfortunately.
But surely this must hold all the more strongly for the "a" word? Even if you're hearing it in a music video as a reference to a social ingroup, it basically amounts to propping up one of the vilest racial slurs around, which just seems self-defeating.
Isn't it somewhat racist?
If you're saying that it's racist because only one race is allowed to say the word:
No, I don't think so. It's not really a racial thing, it's a race and a culture. Not all black Americans say it, not all black Americans agree with it, and not all black Americans can get away with saying it. It's a kinship thing. My wife's female friends can say "you're such a bitch" but no one else would be able to say that to her. My coworkers and friends call me a nerd, but if someone I didn't know called me a nerd I would take it as an insult. They haven't earned that right. It's an offensive word unless there is a kinship developed where I know you're not saying it in a hurtful way.
If you're saying it's deemed racist for non-black Americans to say the word, then yes. Saying it with an "a" would be deemed less racist and more of a very rude faux pax by many. Others may see it as very racist. Also depends on the context it's being said in.
Also the fact people keep writing "the n word", "the word but with an a" feels like communicating with children. Just write nigger or nigga and be done. The sky won't fall. You can't analyze or criticize something you can't name. Especially when forbidden words change every 10 to 15 years because people will just start using other common ones as insults. A simple example would be how "despite", "kings" and "queens" were used to mock black people (not just north-american one) on r/cringeanarchy (which ban must be why this was reposted).
All I was trying to do was to explain to a non-American how Americans view the word. The wrong person saying it to the right person could easily get that speaker killed, that's the power the word has in some communities. You can say it online all you want and you can argue that it doesn't have power, but there are many neighborhoods in America where saying it with an "a" or with an "r" will result in a murder that no witnesses will corroborate.
With an "er" on the end, it's almost always a racist term.
Either way you spell it, it's pretty much only acceptable for black Americans to say it.