If China was writing 5000 years ago, it would seem reasonable to assume some of that capability made it to Japan, long ago.
China was writing perhaps 3500 years ago, rather than 5000.
This link won’t work for me, has an outlandish claim (7000 BC writing in China) that I just must look at later: