No.
PS2 was a very cheap DVD player and had to compete against kiddy Nintendo consoles and struggling first MS console.
PS4 is still only a main game machine and has to compete against a established Xbox brand (with aggressive price cuts and deals during the whole gen, now more than ever: A PS4 costs $300, a XB1 + UHD player costs $200. The year the successful Switch is released, PS4 sells the most.
And PS4 also has to compete against the powerful Steam and mobile gaming. And they are doing that while making more money via PSN than they ever have. Comparatively Sony didn't make that much money with their PS2s.
Xbox One has sold 25-30 million units, XBox 360 sold 84 million units.
But you missed my points and context while focusing only on that one line, which I concede is not the whole story and maybe been better if I had not included it but I did expand upon it in the posts.
39% of PS2 total units sold
after the launch of the PS3 and XBox 360, that is double to what the PS2 sold before the XBox launched and so sold strongly when consoles were probably at the height of
perceived performance/price compared to PCs and games availability.
To be fair though, the Xbox was still not really much of a competitor but it started their exclusives and foundation and had some appeal but PS2 was a juggernaut because of price/performance/games that importantly lasted well into the next generation of consoles and its strength was sustained growth sales figure.
Like I said as well the problem with the XBox One is that it was
not a 'primary' game machine with the confused corporate narrative (along with other mistakes) and that is what crashed its sales with it being perceived as a multi-media/hub/game box but compromised compared to the PS4 not just in HW-performance but games being developed.
Microsoft thought they could target a broader market with the console but unfortunately it seems it is still the focus of mostly console gamers, fair to say only Nintendo to date has managed to gain appeal beyond the general console gamer.
While you mention Nintendo as a competitor historically the PS2,PS3,XBox360 had greater pressure from the Wii that launched in 2006 and is still Nintendo's best selling console of all time by a long way, I am glad the Switch is doing well but Nintendo are still a fair bit off their heights back then.
I concede I over simplified the 1 year without competition, but it needs to be seen in the whole context that the PS2 actually sold more and just as strongly when there was a foundation of competition/hardware out there when compared to the PS4 for multiple reasons.
The PS2 sold more units in a 3 year window after the launch of the PS3/XBox/Wii than the Xbox One has sold to date (4 years available) while PS4 has sold 2.5x more units than the XBox One up to last quarter of 2017, and that says it all really.
Switch is not really eating into the main console sales as it is seen as a distinct segment or purchased by gamers that buy multiple consoles.
Not sure if has any relevance to this thread but part of the discussion looking historically also needs to consider that both manufacturers back then were willing to sell at much higher loss figures per unit when launching (figure improves over time), the PS3 and Xbox 360 being the extreme.
Anyway IMO the latest gen XBox One X is a better competitor to PS4/PS4 Pro than the the Xbox One is due to the market focus and consumers interested in these consoles.