I don't think anyone assumes that the cost of raising children is zero... quite the opposite.
I don't think its key, either. Can say about Japan specifically, but in the West I think it's down to people wanting to have a life, things, holidays instead of having children. It is a choice that is about the whole commitment and sacrifice of having children no matter what.
Japan's population was about 44 million in 1900, it is 123-124 million now.
A decreasing population poses major challenges but they are far from "annihilation" or becoming "extinct"...