I found something that's probably an oversight rather than a bug, but this seems like the best place to put it.
So, I made an alolan marowak set with the ability lightning rod, along with a cell battery. It was hit by a volt switch, but the cell battery didn't activate. Since it was immune to electric type moves, it seems to me like it would be part of the item's mechanics; a cell battery wouldn't activate if the pokemon is immune to electric. I looked it up on multiple sites like serebii, but none of them said anything aboutcell battery not activating on pokemon that are immune to electric. They usually say something like "the cell battery activates when the pokemon is hit by an electric type move" which my marowak was.
Sorry if this isn't a bug, and thanks for reading my long-winded paragraph!