The ROI of this strategy is not as straightforward as your example suggests. In the long-term, markets go up, but as you zoom in markets more resemble a random pick from a normal distribution. That's why you can't divide 7% by 52 and come up with anything like a useful prediction of weekly returns.The 6 month timeframe we're discussing is somewhere in between long and short term. In terms of probability, it's worth doing, but don't expect consistent wins from this strategy.
More importantly, if you're saving at a steady pace through your income, you'd have to set aside money the year before in order to max your Roth on Jan 1. This would be time in cash. Similarly, if you maxed your 401k in the first quarter of the year, the rest of the year's savings would have to go somewhere. Realistically, for the Roth, you're talking about building up a taxable account all year until the next Jan 1 rolls around. For the 401k, if you can max it out in the first X months of the year, you're also able to save about that much the other days of the year. As long as the taxable account is fully invested, you're actually saving/investing at a steady pace and moving funds around at different times.