Most towns have solved the problem for you by closing off their historical centers (centro storico) to Consider that your rental cars will cost you money while remaining unused albeit safely parked.
Historical centres are usually open to all vehicles.