This is an example of not comparing like with like.
In the noun phrase 'the population of Japan', population is the main noun. Population, which is a mass of people, is said here to be lower than Thailand, which is a land mass.
A mass of people is not like a land mass. In order to make sure that you're comparing like with like, use a parallel structure:
This may result in some repetition - 'the population of' is used twice. But don't worry about repetition. Just make sure that you're comparing like with like.
If you want to avoid repeating a noun that is either uncountable or singular, you can use that as a substitute:
In this example, that replaces the population.
If you want to avoid repeating a noun that is plural countable, you can use those as a substitute:
In this example, those replaces prices.