Sanseitō, an ultranationalist populist party, gained in Japan’s elections after framing immigration as a central issue.