This is my opinion exactly. Programming is great if you are in the top 1% maybe 2%, you can make 400k - 800k as just a senior engineer. Everyone else is fighting to keep their knowledge base current, working for companies that do not value them, etc. Basically if you cant pass hard algorithms interviews with a bit of study, you should leave the field and do something else.
Not even hard algorithms, you just have to study leetcode problems these days. There is a website that aggregates them and only so many problems people can think of, they can easily be prepped even by a bad programmer.