Energy storage charging pile optimization