I also have recently experienced my (nearly 3 year old) IPhone 3Gs turning into a sort of Jack-in-the-box device. The expansion of the battery completely destroyed the device,
I have contacted Apple and they have contacted me for the last 3 days. All nice people... true story.
My Apple case had just been 'resolved' which means Apple gave 2 options: paying for the repairs (expanded battery, cracked motherboard, cracked screen, bended/cracked housing) or buying a new IPhone.
A €600 device that self-destructs after 2 years by a malfunction that normally can occur when it is 'end of life' is questionable. Since Apple apparantly is very aware of this being a known issue with the IPhone 3Gs battery I think the Apple 'service' regarding my case and cases stated in this thread is terrible to say the least, warranty or no warranty. Even if Apple wasn't aware of it being a known issue the 'service' would still be terrible.
It's nice this 'safety feature' kept me from getting hurt but still I'm left without a device I did not intend to part from yet and costs lots of money to replace.
Bottom line is: the IPhone 3Gs is a device which carries the Apple logo, so I presume Apple is proud of such device. Considering so many cases of a 'safety feature' which renders the device is completely worthless after a period of a few years... I consider this a design flaw. The customer should not pay for such a flaw or 'bad luck' for that matter.