This would be easy to do. First it would be called a voluntary recall. Don't forget that Apple had a recall of the power supplies to the iPhone, so there is a precedent....if you didn't have the green dot on the power supply you just signed up online and they sent you a new one. If you did not return the non green dot power supply your account got charged.
Assuming they have a fix, The fixed ones will start coming off the line....call them iPhone 4B and the flawed iPhones iPhone 4A. You would need to have enough ip4bs to sattisfy current demand, which would be step one. Step two would be to figure out the number of refurbished phones that could be sold before ip5 comes out. Let's call that number 500k. So you then make 500k ip4bs to fill the hopper. You then query your existing ip4As....let's say customers A-G is roughly 500k. You then tell them to apply for the voluntary recall. You send them all ip4Bs and then either gut the old ones or refurbish them to get your hopper filled back up with an additional 500k iP4Bs and repeat the process with customers H-P and so on. You could do the whole recall in 3 months, problem solved. In the end you would have 500k refurbished iPhones sitting around that hopefully can be sold. All it cost Apple was , labor to fix, shipping, and some administrative costs. These costs are a drop in the bucket to keep there rep untarnished.