I have decided to put a new battery on, the present one was fitted 7 years ago. I can remember when if you got 2 years you were doing well.To prevent loss of radio etc I have in the past connected my 12 volt golf battery to the connecting leads before removing the battery.You worry me about blowing up the electronics on the car .Should I just take the battery out without a back up and then reset whatever needs doing.
You can buy a device quite cheaply that plugs into the OBD port and has two leads with crocodile clips that you connect to a spare battery / golf battery / 12v household alarm battery, which retains all settings until the new battery is fitted. It has led lights that let you know all is well to disconnect the battery.
There are others that plug into the cig lighter socket but I prefer the OBD type.
As to charging a battery on the car, I have two. Both state that the negative lead should be connected to a strong earthing point not the neg trerminal of the battery, and as far away from battery as possible, although this is dictated by the length of the leads.
Some modern cars have specific positive and negative terminals away from the battery specifically for charging / jump starting purposes.