Spin-chain model of a many-body quantum battery