You won't lose the code if you remove the battery, otherwise how would you be able to change the fob's batteries when the time comes? Can you imagine the outrage when Moco tells you ' Yeah, looks like the battery in your fob died, that'll be $100 for a new battery and reprogramming.' Just remove the battery if you want peace of mind.
That's what Apple does when your battery dies on an Iphone.
I change my fob batteries every year and never had to re-program anything. Go with the insulation tape between battery and contacts inside the fob. Question: Why would you need to re-program??
Get the "V-Twin Reference" app, if you have a smart phone. Among other things, it has a reminder of the procedure on how to start your bike if you lose your fob/fob failure. Or take the batt out of one of them ...