I'm in that $250k range. When I'm looking for a new gig I would much rather have skills that 100 companies are hiring for than skills that 5 companies are hiring for.
That said, I do need something to differentiate myself from any other rando they might hire for less. That could hypothetically be a niche technology. I once met someone who specialized in making databases of 3D artifacts. He made a ton of money bouncing form one defense contractor to another creating their object databases for simulation purposes. That's the "niche knowledge" path.
In my case, that's soft skills. I'm a great communicator with a history of using those skills to land big project successes. In particular, I don't make the business people feel dumb when I explain technical things to them, and being a small business owner myself I have a better balance of understanding between business needs and technical needs compared to most devs.
For engineers early in their career, I'd say you probably want to focus on tech that is adopted but not generally viewed as heading towards obsolescence (React or Java are in this category, for example).
Mid to late career it can be smart to latch onto tech in its growth phase if you believe in it. For example if you were early on the Kubernetes train and managed to build those skills well you're worth a lot of money right now. Actually making that kind of judgment call probably isn't smart when you're junior because you're unlikely to have the kind of experience and instincts to consistently pick winners.
Concrete: I learned React a while ago but find Svelte interesting and think it has potential. I am no SWE but interested.