What part exactly is not clear
How the resistor manages to consume energy without there being any transfer from one side to the other.
This diversion to how capacitors charge and at what cost, etc, is simply your smokescreen that you hope will obscure your inability to deal with the real issue.
You are charging an energy storage device.
Actually, I am heating up a resistor. Where did that energy come from, and how did it get there? The only energy source available is the power supply upwind of the capacitor. So, from what I can gather from your 'explanation' it goes something like this:
PSU: "Hey Cap+, gonna shove you some lovely joules."
Cap+: "Eh? Oh, hang on a mo..."
Cap+: Oy, Cap-, you wanna dump your old electrons and get some new ones?"
Cap-: "Sounds fab to me."
Cap+: "OK, let's have them then"
PSU: "Here you go. Enjoy!"
Cap-: "Hey, resitor, 50gazillion elect(r)ons coming your way!"
Resistor: "WTF? Now?!?! Shit, have to burn them up."
I don't think energy storage has meaning in this context. The cap is series with the resister and you talk as if it's in parallel and providing the juice. It isn't - the PSU is. If anything, the cap is acting as a blockage.
Bringing in a battery complicates things, just as inserting a diode would. Let's keep it simple with the minimal parts necessary to show the problem.