Cooling method for energy storage charging pile