Suppose I max out my 401(k) really early. This avoids the risk that if I lose the job I would have lost the chance to contribute to it fully. However there is another risk. My company doesn't match. Suppose I do lose my job in the middle of the year and go to another company that matches. Then I would lose out on the ability to get the matches from the new company in the rest of the year, because I (technically) cannot contribute more 401(k).
But... Since the new employer doesn't know how much I may have contributed, I may (should this scenario of changing jobs really occur) simply pretend I didn't know anything and contribute to the new company's 401(k) plan anyway (taking advantage of the matches), as if I didn't have 401(k) contributions already. Then, after the end of the year, I can ask the old 401(k) plan for excess contributions back from that plan, as allowed by the IRS before April 15th.
To summarize, the strategy is, if I switch jobs, contribute fully to each job, and then at the end of the year, strategically withdraw excess contributions from the one that had the lowest match.
Would this strategy: (a) work? (b) make sense? (c) be legal? (d) be ethical?