So true about the last part! Over my last 8 years, I've learnt that to grow in the company and have a good position, you need to be a rock for at least 1 core area the company works in. Like you said, "become a knowledge source, a reference"
This was what I ideally wanted to do. In practive, when I'm laid off every 3-4 years (right around the time I start to feel like I'm becoming a knowledge source), the layoff hammer comes down.
Maybe it'd be a bit faster now with 9YOE, but In some ways I also feel like I'm "3 YOE 3 times over".
I don't really have a portfolio. There is nothing impressive in my Github. I don't have my own website/blog. I do have a good track record in my previous companies and plenty of old colleagues willing to give a good reference if needed.