I don't think the relationship is that simplistic. On [StackOverflow Survey for 2022][0], the top salaries were for Clojure, Erlang, F#, LISP and Ruby. Elixir comes in 6th and Python comes in 25th. Choosing a niche technology may be a way to increase your salary and have more leverage because you will become a specialist on a niche (an increase of more than 40% when going from Python to Clojure by measure of average salaries).
Of course, it would be reductionist to say "learn Elixir and you will be paid more", but I also think it is inaccurate to say choosing a niche language is a certain trap. The best is to explore the companies, communities, and opportunities around you, especially in relation to which point you are in your career, instead of generalizing pros/cons as cheer-leading or blind optimism.