In German we use “Akku” which is short for “Akkumulator” for rechargeable batteries.
"Pila" is a heap of countable physical units, either stacked or disordered. But pila is commonly a fixture for liquids, like septic tank is pila séptica
And batteries were mostly lead-acid. Hence, a pile for/of acid.
I was unable to find out who coined "Voltaic pile" after a few minutes of Googling.