Academic side of academia? Not sure what that means, but it sounds like an unhealthy reason to do a PhD, FWIW.
If you're serious about finding your way in academia, I recommend the book <em>A PhD Is Not Enough!</em>
The terminal degree for physics is a PhD. Therefore a PhD is a minimum requirement for most jobs in physics research. However, I highly recommend the book A PhD Is Not Enough!: A Guide to Survival in Science for anyone considering a career in the sciences.
A bachelors degree in an ABET accredited CompSci program is usually enough to get hired in entry level positions. A masters degree is the highest degree recognized for career advancement. A PhD is only required for a career in academia or research, which account for a very small percentage of jobs in the software industry. A college degree isn't even required to get hired for programmers who know their stuff, have gained credible experience somehow, and have good references. There's also at least 20 time more jobs related to software development compared to physics. That doesn't necessarily make software a better career choice than physics, since that depend on how well the positions match your personality and skills.
There's also careers that require interdisciplinary skills. There are programmers who do need to know physics well, even though that's a small percentage of the overall market. Even 1% can result in 3,000 possible jobs when the overall market is 300,000 positions.
A PhD is Not Enough! A Guide to Survival in Science by Peter J. Feibelman Amazon link
Make Your Mark in Science: Creativity, Presenting, Publishing, and Patents, A Guide for Young Scientists by Claus Ascheron and Angela Kikuth Amazon link
I read this about a year into grad school (previous version). It's got some good general advice on how to think about your time and what to do with it to succeed.
https://www.amazon.com/PhD-Not-Enough-Survival-Science/dp/0465022227
If you're interested in doing that, I recommend you read <em>A PhD is not Enough!</em>.
In addition to the other comments, read A PhD is not Enough!.
After reading the other posters, I have a couple more thoughts:
I'm sure I have more tips, just ask if you'd like.
I highly recommend books A PhD is not enough, and PhD grind, they answer a lot of questions and I wish I've read it before starting my PhD.
Depending on your field, it might be the case that you would get a good position right after your defense, especially since you already have a lot of industry experience and willing to teach. Furthermore, a lot of universities practice 'equal opportunity' policies which forces them to not discriminate based on gender, age, or race. So this might be a good part that by your defense you would be in your early 40's.
It might be a good idea to find someone from your target field and talk to them about their path to their current position, how many postdocs they had to do and so on. Maybe you will find out that some of them don't even have a PhD degree, I don't know. A lot of these things depend on your field.
If I were you, though, I would consider other ways to scratch that teaching itch. Getting a PhD is a daunting and not that rewarding. But then again, it's a nice change of pace and might be your 3-5 years vacation.