Performance is expensive. Building and validating a system around high end custom chips is expensive. They also will not make you units if you don't make serious volume commitments.
Building a very basic system with cheap, bad, off the shelf components is not expensive.
Yes, designing the chips is obscenely expensive. Microsoft and Sony aren't using off the shelf $5 SoCs. They're partnering with AMD, using AMD's IP, to make custom designs specifically tailored to their design goals. The fact that you think you can talk about R&D costs without understanding this basic reality is hilarious. Validating high performance custom SoC designs takes a tremendous amount of very limited capacity of small batch test manufacturing ability to get to an end product.
I promise you Sony spent more developing their triggers than Nintendo did on the joycon. That actually is new tech. Putting IR and nfc sensors that already exist onto a controller isn't that expensive. Developing new tech is where costs come from. Sony isn't spending a couple hundred million. They're spending billions, every year.
Even after kicking their investment up for a switch 2 that can't use an off the shelf chip because there isn't one, they're still spending less than half of what Sony does.