If its a commercial electrolysis system used, strictly adhering to instructions, with a correct commercial electrolysis fluid, you should be safe.
However, you need to be careful,
as you CAN damage/remove barrel steel and rifling by overdoing/improper use of electrolysis, or using the wrong chemicals,
or using "home made" electrolysis setups or home made chemicals.
Its a fast way to ruin your expensive barrel and get that sinking feeling in your gut that you just destroyed something good and valuable.
FYI when using electrolysis, when the fluid turns black, that is evidence that you are destroying the barrel,
as the black is extremely fine particles of iron oxide (i.e. barrel steel) in the fluid.
FYI very old school ink (as in inkwells and feather quills) is black because its made of very fine particles of iron oxide.