Big difference though is that PS4 had terrible HW sales and install base, so of course the games on 10m PS3 and 5m Vita sold more than PS4. The Switch on the other hand nearly equals PS4 install base.
Yep, this is a riddle to me. Japan is without the question which is best for Switch hardware sales. Still, japanese 3rd-party games sell mediocre there. Often these same games do sell better than on PS4 in the West. So, what happens there? Is Switch perceived different in Japan than the rest of the world? Which leads in the West to good sales of 3rd-party games, including japanese ones, but have different effects in Japan, although good hardware sales?
You might begin by asking what led to the erosion of PlayStation hardware sales in Japan. "Home consoles aren't as popular as handhelds" doesn't cut it for an answer, because the Vita sold worse than the PS4. The amount and pedigree of third party software that PS consoles receive isn't an answer either, because it remained high on both accounts.
What makes Japan different is a shift in demographics. The country has had declining birth rates for about two decades. But unlike the other developed video game markets in the world, Japan closes itself off from immigration. Declining birth rates are the norm in developed countries, but immigration softens or offsets it, because immigrants tend to have more children. What has been happening in Japan is that children accounted for an ever smaller percentage of the total population which remained largely unchanged. Lower birth rates first mean fewer children, then it means fewer teenagers.
The PlayStation business largely revolves around stealing customers from Nintendo. Nintendo has high popularity among kids, Sony positions itself as the cooler brand and lures teenagers, the age group that cares the most about image, to PlayStation. The shift in demographics is the reason for the decline of PlayStation in Japan. Console manufacturers have to appeal to the growing percentage of adults in order to get a console to the same heights as in the past (most of the popular consoles in Japanese video game history have sold ~20m lifetime). Nintendo is able to withstand the shift in demographics because their own games cover a very wide age bracket.
When it comes to PlayStation, Sony's first party is barely making an effort while most third parties decided to double down on software that is targeted at teenagers and young adults (namely otakus, the guys who don't have or get girlfriends) in order to squeeze out more money from individual customers. That's why it became a running joke that Vita games plaster tits on their covers. It's not exclusively about tits though; games can very well be tailored to the PlayStation demographics without being oversexualized.
Because there are many third party games that are PlayStation first, we'll continue to see individual titles with large discrepancies in sales between PS4 and Switch. But we also see games where sales are in line with total hardware sales. The lack of a PlayStation handheld in the market doesn't mean that Vita owners will migrate to Switch; it's more likely that they'll move to PS4, if they haven't already. Given that Switch sells at a much faster pace than any recent PlayStation console, it should be clear that Switch owners do not have the same demographic breakdown as a PS console and as such anything that could be called PS-centric third party software isn't going to light up the Switch software charts, because the main demographic for that kind of software is still firmly on PS.