It's doing fine.
Last gen's total: 30.41m
3DS - 24.55m
This gen's LTD: 17.06m
Switch still has several years of sales left, so matching last gen is doable. It's also worth noting that a market size of 30m is remarkable in a country with ~120m people. That's 1 in 4 persons who own such a device.
3DS also had one huge advantage over Switch, which was all the cool limited edition consoles. I think I have about 30 of them now lol. I am sure some gaming enthusiasts in Japan would have done the same.