Yu realize at some point, your battery WILL have to be disconnected. This is importnat for battery maintenance as yu are trying to do, and approx every 5 years ,give or take, expect a battery replacement. It could just fail someday and be dead one morning.
Regarding the battery terminals, They must be disconnected , Both. Always
diconnect Negative first and alway reconnect Pos. cable first.
Soak and dip cable ends in warm water solution with baking soda. The only way to correctly remove /neutralize the white acid crud. Brush onto bat terminals also. use a soft wire brush. Do not let let foaming solution get into batter caps. When done rinse all with plain water and dry. There should be absolutely
no white acid residue left, or it will just continue and corrode terminals!
Grease terminals and reattach all. The grease will prevent acid build up down the road. This procedure should be done every year.
Yu might know all this already?

Sorry if I bored yu.
>>Regarding the radio, yu just need the
model number of the radio as shown
on the face plate somewhere. And there is a cross reference for the code listed either with the dealer or online. I would ask the purchasing dealer do do it for FREE, A "
working radio" was part of the purchase, in my opinion. This should always include the Radio code, whether bought new or used. That would be like buying a car without any keys!!
Option: Also, There is a battery backup device (uses a 9 volt battery) that can be used for power backup on radio, ECU, and clock settings. It supplys enough power while disconnecting the Cars main battery.
It is inexpensive and many mechanics use this. I have even seen homegrown versions of this device.
Toyota radio code
Toyota Radio Decoding Service > SWS Car Audio Accessories
Good luck
LifeTech