The more senior programmer I become (both in age and skills), the less I can actually focus on a single programming task. I am expected to know a metric ton of tooling for 2000 separate purposes. So I learned to quickly master tools just good enough. Same goes for frameworks (which has been to the detriment of the projects sometimes, sadly; there are things you cannot afford to half-ass).
Basically, as a tech generalist and a polyglot, my job is to assemble bricks into walls into houses. Rarely do I get to write the perfect brick or glue. I am much more a plumber and architectural worker than anything else.
So IMO if you are not in a single company for most of your career and want to be competitive, you have to be a generalist.