The S-500 is designed for long range and high speed interception - it's meant to replace the A-135 anti-ballistic missile system, protecting against not only ballistic missiles but also hypersonic weapons. It's similar in role to the american PAC-3. While there seems to be many articles claiming it is an "F-35 killer", these don't appear to be based on any substantiated evidence and the requirements for defeating stealth are wildly different from its missile defense role. The S-500 supplements the S-400, which is the primary anti-aircraft system and the S-400's 9M96E missile is designed to hit stealth targets.
Any radar that can see F-22 or F-35 will in turn be visible by them. It will be a cat-and-mouse game. In which case training, doctrine, improvisation and quick learning matter a lot. Weapons may be expensive, but training is expensive too. Expenses aside, how can Russia train to use its S-500 against US stealth jets? Using what jets as mock F-35's? Conversely, the US can very easily train against a simulated S-500 battery. It's not like S-500's radars are some big secret.
I think you are missing one of the key ingredients to anti-stealth radar, and why we have shifted to a strong focus on RAM. That would help answer your own questions. I won’t say it here, but separately it certainly is possible to train against targets which would produce returns analogous to an F-22 or F-35 type aircraft to various radars.
On another note, US anti-air capabilities are already far behind the S-400. I understand we don’t have an immediate use case ourselves, but the lack of a credible AA system pushes potential partners like India and Turkey to fight with us for the right to buy the S-400.
It seems like the pendulum has swung back in favor of air-defense systems. Also doesn't help, I am sure, that the biggest weakness of the F-35 is itself. I am also curious, in the event of a breakout of hostilities, is there any way to emergency-reboot F-22 manufacturing? Or is 187 all we have, and that's it?