Is there a better way of achieving what I want?
Don't use AE? Just kidding, but your own analysis very much covers the facts already. Yes, it's AE going back and forth in time and yes, it's the holding of those frames in memory which is chewing up your memory. Depending on the situation you may look into patching up your disturbances with masked still images rather than cloning across the sequence, but beyond that I don't see much potential to make things more efficient. It's just AE trying to be über-smart with caching and then making a mess. The only other thing is the RAW import, which may consume unnecessary memory. Batching the files in Photoshop and only using PSDs or TIFFs in AE may squeeze out an extra GB of RAM. On that note also consider doing the cleanup in PS. After all, PS Extended does support video/ image sequences to some degree...
You need to empty out the cache. There's a preference for this that can be reached by holding down the Cmnd/Ctrl + Shift keys and going to Preferences>General and clicking. At the bottom of the list you'll see Secret. Check Disable Layer Cache and set a low number for the number of frames you purge when making a movie.
If this doesn't fix the problem while you're doing the cloning go to Edit>Purge and clear out the image caches.