You misunderstand the metaphor. The batteries scene was about the Matrix as a system of control for harnessing human cognitive output - the Matrix is just a proxy for "The Man" in our world. The entire third movie is about control and purpose vs non-determinism and free will.
I really enjoyed this documentary on Philosophy and the Matrix - https://vimeo.com/53000177