Almost all of the developed world have fertility rates below replacement levels. Japan has decided not to import masses of foreign workers, but rather, to use automation and technology to cope with a declining work force. They would rather maintain their culture than risk the social consequences of importing large numbers of foreign workers. That said, there has been a modest increase in immigration.
Japan has the world's third largest economy. It has the second oldest population with the median age being 47.3. Germany is third with 47.1. The US has a median age of 38.1, the 60th overall oldest. Canada's population is even older at 42.2. Japan has the second highest life expectancy at birth. The US is 43rd.
If the population was growing they could work their way out of the problem.
Growing populations may increase GDP, but the individual slice of the pie may decline. The impact of technology and automation are making workers more productive and decreasing the need for workers. Despite the low US unemployment rate, the US labor participation rate has been declining for decades. We have over 90 million people age 16 to 65 out of the workforce. Below is the labor participation rates over the past 40 years.
May?