the idea of storing overflow is good. I use it too. BUt remember that the next build will use that overflow. The only way to affect the overflow to the settler is to spend a turn building one.
You can do what you described only up to the hammer value of the unit you whip, provided you whip without any hammer invested.
What I mean is you couldn't accumulate enough overflow to build a settler if you don't whip 100+ hammers units without any hammer invested

.
I do use this technique (in some way) to maximize overflow going into a wonder = starting to build the wonder before it is available.
Often the best way to do it is whipping a building for which you have a bonus (like a wall with stone), since the overflow is only capped by the base value of the building (though the overflow will be reduced to take into account the bonus).
Example : you want to build the sistin chapel, but you're 12 turns from theology. You're spiritual.
You start a temple.
Next turn you whip it for 2 pop.
Next turns you build science (or gold, if you can), while growing pop as high as possible (1 above happy cap, the happiness penalty will disappear).
As soon as theology is in, you start the sistin chapel. You gave yourself a head start of 20+hammers.
Time to MM for max production with a 1 more pop than before (raised happy cap).
If you want to headstart harder, you will need to invest a few hammers into the temple, then whip a unit before the temple, then whip the temple.
With a lot of MM (and luck to have the right tiles at hand), you can make it this way :
- invest 9 base hammers (= 18 hammers with bonus) into the temple
- invest 4 hammers into the axeman
- whip the axe for 2 pop
(- regrow while building science if needed)
- whip the temple for 2 pop
- regrow while building science
- apply 58 base hammers to sistin chapel.
note 1 : the overflow is adding the hammers you would have gained from tiles on the turn you whipped.
note 2 : I fear it's capped before applying the correction for bonus. So it would be capped at 80 before correction = 40 after for a temple

.
note 3 : Also remember that invested hammers start depreciating after 10 turns for a unit, 50 turns for a building, meaning you'd better start investing hammers into a building.
Maybe the best move is to whip more pops for a high cost building for which you have no bonus?
Like a forge when you're not industrious

.
There is always a cost to all this : loads of turns invested here + high number of pop lost.
I need some testing, but I'm pretty sure the best way to do it would be to invest hammers in a lot of different buildings (like granary, temple, forge), then whip them with "overflow storage" in between. This way you could apply up to the cost of the highest priced building to the wonder + benefit from the effects of what you whipped.