In order to do this, you would need to desolder the flash memory from your iPhone's logic board, then solder on a recycled one from an old iPhone with a larger storage capacity. This would require a TON of soldering skill, as you would have to properly desolder the flash memory from both devices, then resolder the larger one back on to your device.
All in all, I would not recommend this. However, I'm sure there are millions of people out there better at soldering than I, so if you are feeling extremely ambitious, [guide|7289|this guide] will get the logic board out for you.
Hope this helps!