If you look at the graphs you referenced you can see that the data for South Korea and Japan are totally different. South Korea's infection rate has fallen, and continues to do so. Taiwan's cases don't even register which shows that Taiwan is doing even better than South Korea. Japan, however, has failed to reduce their infection rates which continue to rise, just at a low pace than other countries apart from those mentioned above. It is still rising exponentially ( because it's a flat line on a log graph ).

Prime Minister Abe Shinzo has recently announced that the govt is going to distribute 2 cloth masks to each family in Tokyo to try and reduce the infection rates.
So, the question should really be, what are Taiwan, Singapore, and Hong Kong doing differently from other countries that might halt the spread of Covid-19. The answer is they are doing extensive contact tracing, testing, and quarantine. All of this is designed to find the asymptomatic infected population that are driving the disease, and isolate them.
South Korea has won global praise for swiftly making coronavirus tests widely available and has already tested more than 394,000 people. It has found 9,583 infected people.
Japan, a country whose population of about 127 million is more than twice that of South Korea, has conducted more than 48,000 tests on approximately 28,000 people and found 1,724 cases.
https://time.com/5813619/japan-coronavirus-lockdown/
https://www.washingtonpost.com/world/asia_pacific/japan-targets-coronavirus-testing-while-south-korea-goes-big-the-us-faces-which-path-to-take/2020/03/28/97e81b44-6eb6-11ea-a156-0048b62cdb51_story.html