First you have to get the right chips - most so easy with OEMs snapping up all the supply (and Apple will get bulk rates where as you will not).
Then you need all the right equipment - a fully equipped microelectronics lab would have most of what is needed I suppose.
You would have to unsolder the existing chips - not easy with surface mounted components... Then you would have to solder on the new chips (tricky operation that manufacturers let robot manufacturing systems perform), and not damage anything else in the process. And do it all right first time (debugging where you went wrong would be a nightmare).
That assumes that the new iPhone logic board has not been modified to take the new chips in some way. If it has - you are probably out of luck and this isn't going to work.
Then there is the question of whether there are any firmware changes required to make it work (if you have an iPhone that works at all by this stage).
In short - such an upgrade would be so expensive in time and equipment that you are better off just buying a 16GB iPhone.
well with that thought there would be no one with a unlocked firmware...
was it worth it for them to risk "bricking" their phone for just "double the apps"?
some people are good with electronics and would like to try. plus the 16gb chip is cheaper than a whole phone, so someone with a 4gb might want try try some hardware swaping if its a possible solution for them.
I know i'd consider swaping my 8gb chip out for a 32gb if I found it to be possible.