What was written about Japan and China is absolute bollocks and I have no reason to believe what was written about the “Hindu Caste” is any more reliable.
Han was the name of a Chinese dynasty. It became the ethnonym of the core Chinese ethnic group later though Tang has also been used as such to my knowledge. I wouldn’t be surprised if there are other similar uses.
More or less everything written about Japan was false. Before the Black Ships, the Matthew Perry expedition when the US forced Japan open, ending its policy of isolation Japan was amazingly close to mono-ethnic for a pre-modern state. There were the Japanese proper, the Ainu and the Ryukuans/Okinawans and that was it. Not allowing your people to leave and come back rather damps down on foreign populations and absent constant replenishment immigrant communities assimilate. Insofar as Japan has a caste system it long pre-dates WW2. The eta/burakumin are still treated badly. The absolute dumbest thing about the comment was not referencing Japan’s long standing othered ethnic minority, the Zainich Koreans who were stripped of Japanese citizenship after WW2 given that Korea was no longer part of the Japanese state.