It depends on whether you do a PhD in Pure Science or Applied Science.
If you manage to get a PhD in Pure Science, which is incredibly difficult, it might still not get you a foot into the industry unless someone sees the link between your PhD and the possibility of applying in the real world, say Memory Storage. You could end up a Post-Doc.
If your PhD is in Applied Sciences (Robotics or Information Security or Deep Learning) then it is relatively easier to get into the industry because you will be applying your research skills to help commercialize a technology based on your research output. This is also a bit more interesting because you get an opportunity to apply your PhD to address real world challenges that you rarely encounter in a lab.
So if you planning a PhD for a non-academic career in software pick a problem in the real world that the industry wants to address and that should provide you a path. Google, Apple, Microsoft, Amazon and several other product companies hire PhDs who can address critical challenges in Software/Memory Optimization, Cloud Security, Deep Learning , Industrial Robotics and several other areas.
Is it worth it? Depends on what your motivation is? If you want to enjoy the challenge of solving something that has never been solved before and dont mind working in an uncertain environment with minimum guidance, PhD is for you. If you prefer a predictable job which involves working on things that are more familiar, Phd isnt for you.
I hope you find this information helpful, see you on the next topic.