Going for a PhD after being unhappy in industry
I strongly disagree with user117219. When I started my PhD, I was not 100% sure that that was what I wanted; the PhD seemed like an OK option to me at the time. Now I'm an assistant professor, loving my job. Your mileage may vary, and it might not. No way of knowing in advance.

If your personal finances can take the salary hit that comes with transitioning from an industry job to PhD research, it can be the right move to make. You indicate that your primary goal is to do intellectually stimulating research, and a PhD is definitely one way to achieve that.