So what may happen is if you have a low-thrust engine, you will do a burn at the optimal time, then stop and wait an orbit until you reach the optimal time again. But you're not "stockpiling" anything so much as you are just thrusting at the optimal time. And once you reach escape velocity you have to keep thrusting, there is no more opportunity to do another pass.
I think the mass of the body only matters in how much momentum it has. If you fly by an asteroid you will deflect its course. You could convert the entire mass of earth into spaceships and slingshot them past Jupiter and it would barely register.
Seems like a Jupiter gravity assist would always be much more practical.
Takes some careful orbits and a long time, but NASA does it all the time.