Sony are in great shape for PS4. R&D this time around will be much less - no bluray delay, no issues with yields, no complex CELL (hopefully). They have some decent tools now and they'll carry across to PS4 nicely as there isn't anything major tech wise coming, just faster and more. And they have a great set of first/second party teams producing great exclusive content.
The only pain for them is they'll likely have to cut short the PS3 generation to get PS4 out in a similar timeframe to Nintendo/MS. So that might reduce their expected lifetime volumes of PS3.
Just because they won't repeat the mistakes of the PS3 (says you), doesn't mean they won't make entirely new mistakes.
And it's hard to deny that they've lost mindshare this generation.