I have used the electrolysis method and had excellent results, couple of links below one of a ZF4 scope and 1903 bayonet.
A mild solution of phosphoric acid will do the same, but water, a scrap bit of metal, soap powder and battery charger is a cheaper and safer method, at work we use a Unitor product called Metalbrite, has about 15-30% phosphoric acid, similar kind of products are alloy wheel cleaner etc, white vinegar will also do the trick, I used this along with a electrolysis to clean up my Matchless WD petrol tank.
https://www.milsurps.com/showthread.php?t=54108
https://www.milsurps.com/showthread.php?t=50556