Neither immigrants nor robots will prevent them from becoming essentially extinct as an ethno-national group if they don't do something serious to stimulate the fertility rate. They need to find the root of why Japanese aren't having kids and resolve it.
I'd say it's due primarily to the collision of their values with Western values, particularly concerning family and workplace roles. The core issue is actually being faced by all developed nations, but it hits Japan really hard due to their immigration stance as well as lack of natural resources (they need to excel in providing globally scoped services).