Doesn't matter. It's an answer I was looking for, even if the OP wasn't asking it. Density arguments answer a lot of physics questions. Why should energy, linear or angular momentum, or center of mass (also intimately related to density) be any different? It is an isolated way to treat the problem (involves nothing other than batteries, the motor, the generator, and the wires and the shaft connecting them). You did not specify the relative sizes of any of those components, not that it would matter. You didn't specify the mass, size or shape of the shaft or the angular velocity. That matters rather a lot to a question about what happens to the center of mass. I don't care what the energy capacity / density of the batteries are either, obviously, so I assume it is infinite. Nothing wrong with that. You left it open. The motor can handle any amount of current or energy, and can deliver unlimited torque and rpm to the shaft. That's still isolated, and shifts the center of mass of the system to whereever you want it to be subject to the physical extent of the shaft. Or you could have used pulleys. Same result. Whatever spins with the greatest energy density is where the energy / mass / center of mass goes. You really had something else in mind? I doubt it is as important a consideration as energy density. Final answer.