The logistics don't work quite like this. First, for companies like HP, Apple and Nintendo, they work with their logistics provider to setup a Customs pipeline months before the product actually ships. U.S. Customs has a process for this and FedEx and UPS have departments dedicated to just setting it up. The end result is a rubber stamp process that clears the product through in hours, not days or weeks. Also, ships aren't practical for shipping small electronics. A 747 or 777 can carry a metric crap load of iPhones and the shipping costs distributed over all those phones is a fractional part of the overall cost. You need to get up to something where the packaging is the size of a TV for ships to become the better option.
Finally, as many have pointed out.. this is just assembly of parts made else were. For the just in time assembly to work as you described, your still going to have to have a large volume the parts on hand to avoid shortages, which means if the product doesn't sell you going to be setting on an overstock of parts instead of final products. Many of those parts (screens, batteries, logic boards) are customized for your product and have no practical resale value.
There are a lot of people who have put a lot of thought into trimming the cost (and risk is a cost) of this entire process and off-shoring remains the cheapest and most practical option. Changes in the world economy will eventually shift this around (just as it dictated the US the world's produce in decades past).