An Endless Sea of Perfect Shining Robots

Robots could fill the jobs of 3.5 million people in graying Japan by 2025, a thinktank says, helping to avert worker shortages as the country's population shrinks.
Japan faces a 16 percent slide in the size of its workforce by 2030 while the number of elderly will mushroom, the government estimates, raising worries about who will do the work in a country unused to, and unwilling to contemplate, large-scale immigration.
The thinktank, the Machine Industry Memorial Foundation, says robots could help fill the gaps, ranging from microsized capsules that detect lesions to high-tech vacuum cleaners.

Here's the question Borjas wants to ask:

Which path is most beneficial for the pre-existing population of the country? Importing low-skill immigrants? Or building robots? And is the difference in the economic benefits between the two alternative policies big enough that one should pay more careful attention to this choice?

Yes! And which path is most beneficial to people who own stock in robot companies? (Can we at least make the robots look like immigrants?)
Another angle on the Japan story is this. Suppose you basically treat your country like a big club with a racist admissions policy, like the Japanese do, and you therefore let almost no one in. But your club members are not having enough children to replace themselves, as the Japanese aren't. Can you get robots to give you steady per club member income growth even as total membership and absolute economic output shrinks? Or, if the robots are good enough, and numerous enough, maybe absolute GDP doesn't shrink at all, and you get ever-fewer people dividing an ever-growing pie. Imagine the last Japanese family (declared endangered by the Institute for Human Biodiversity), hundreds of years hence, possessing the entire growth-compounded GDP of Japan. It could happen!
Or…