1) Electrode G deals damage to itself, in no way is dealing damage to yourself an effect.
2) Unown G was eratta'd to read "Prevent all effects of attacks done to the Pokemon Unown G is attached to by your opponents Pokemon."
In short, no, it doesn't prevent you from hurting yourself with Electrode G.