The current research climate favors the proliferation of many early-career-stage researchers (PhD students, postdocs) who have not enough places to go if they want to stay in academic research (recent Nature article on the issue). The amount of research-based positions in industry is arguably even more limited.
The limited amount of overall positions available make competition fierce and, even when successful, often one needs to be flexible to relocate, including moving to a new country. This all gets increasingly difficult as one becomes older and family, mortgage, etc. start to be parameters in the equations.
Doing a PhD + (one, two, three...) postdoc(s) usually makes you highly specialized in a field/discipline, but also gives you skills that can potentially be very valuable in the general job market: dedication, technical writing, analytical skills, ability to quickly learn new things, possibly proficiency with computers including coding... to name a few. I am however a bit skeptical of how much these abilities are appreciated by the average employer, and there is also the issue of how to adapt to (i.e. how to feel motivated at) a "boring" "normal" job after spending several years in the exciting and challenging world of research.
While I would ideally like to keep doing research, all the points above make me fear that at some point I will just need to seek a job outside academia, and I want to be prepared. My question is for those who have made the transition out of academia or are in senior positions and have witnessed people (un)successfully making it out. How does one pave his way out of academia? What skills are useful to develop in order to have good chances to make a successful transition? What strategies to follow and which behaviors should be avoided?
I work in condensed-matter physics, so answers specifically pertaining to STEM disciplines are particularly welcome.