I've been in the industry 20+ years and have had my share of ups and downs. Some advice for what it's worth. Focus on what you enjoy doing and avoid what stresses you out. The industry is wide enough that you can likely find a job doing what you like in an environment you like. For me that meant being a little less ambitious in terms of income but working in a laid back environment with people I really enjoy and doing back end development. I will never do UI again and I only work on languages I find enjoyable - mainly Java & Python.
I've been a coder, manager, director, CTO and one thing I have learned the hard way is "You are responsible for your own happiness".
Yes this industry is full of fakes and scoundrels and clueless biz people but don't let them steal the joy you have in creating software