I have a philosophy degree and work as a developer / data scientist. But I think it was advanced skills in math and programming that led me to philosophy, not the other way around. Philosophy was a way for me to improve my structured writing and arguing skills.
Several of my most interesting friends have philosophy degrees. Being able to engage on any subject because you have well-developed reasoning skills is pretty great.
However, I would strongly recommend going for a more lucrative degree, or not going to university at all. The economy of today is much different than what it was generations ago - focus on career, study philosophy in your free time.
I majored in chemistry and minored in philosophy and looking back several years later, I think it served me well. My job prospects are wildly better than the average being shown in the article, and I still managed to get broad exposure to the most popular philosophers and (much more importantly) multiple classes on formal logic. The latter point really has been critical for improving the way I engage with new topics. Many of my colleagues seem to have chosen to double down and focus almost exclusively on STEM related endeavors, and I think it has really limited them. These are brilliant people working at top institutions on problems that really make a difference to the world, but you'll still hear them uncritically parrot popular political talking points or old wives' tales that any rigorous analysis should readily discard.
Philosophy is a wonderful and useful discipline, but new degree holders may be disappointed if they expect to work in their field for reasonable compensation. Your advice to study the topic while also pursuing a means of adequately supporting yourself seems excellent.
The issue i see with philosophy major at the academic level now adays is that it’s not what it used to be. That is why philosophy major at the post grad level is so confined with what it can directly do in comparison to let’s say a stem major. By 17th century and prior, philosophy required beyond a focus on morality but also focused on mathematics and the cosmos. Even further back, Plato mentioned geometry as crucial to philosophy. If those initial requirements were still present to become a philosopher, then present major holders would be much more impressive.
Critical thinking is a required course even at the community college level. Deductive and inductive reasoning and logic were required, so was an ethics class, as well as philosophy of science. As a philosophy student, I feel like it teaches you how to learn better, how to spot patterns and sets, how to think critically, how to troubleshoot. They even had a philosophy of law class that had both philosophy grad and law students in it.
It really is the perfect undergrad major to go on to grad school for really any subject, and as a degree to go on to any job, you couldn't do much better. Most people don't use their specific major's knowledge much in the real world, and philosophy is a great foundation for anything.
Certainly logic and deductive reasoning are necessary for physics, and, as a result, a physics major will be taught these things without ever taking a philosophy course. And, of course, I agree that philosophy is a subject that is well worth taking for a future physics graduate student. However, this alone will not be adequate preparation for a physicist. Even if you have excellent deductive reasoning and know all about the foundations of logic, that doesn't mean you can solve a differential equation or write down a sensible Lagrangian. There is simply too much practical skill and knowledge that an aspiring physicist must know before doing research that an education in philosophy alone will not provide.
One particular mode of reasoning that a philosophy education does not really teach is statistical reasoning. While a philosophy student might take a course or two in the foundational principles of this kind of reasoning, it is not common for philosophy students to be taught how to put these principles into practice, quantitatively. But for a physicist, theoretical or experimental, the quantitative application of this kind of reasoning is bread-and-butter, and it takes time to develop the ability to do it.
It's not like philosophers have a monopoly on logic and deductive reasoning, right? These are foundational notions, and most if not all fields would provide training in them. Of course, if one was into formal and deep study, a philosophy class would be more relevant, but enough understanding to usefully apply these is in anyone's remit. So, e.g., most people would know what sound deduction is, but most (myself included) would not know the difference between a first and second order theory. Similarly philosophy of science, at least in the sciences.
That said, I'll take further issue with your comment. (Only talking about STEM because that's what I know best. Also, theorist bias.) Most 'hard' sciences comprise not just a way of thinking, but a large body of technical knowledge - both specialised and general (e.g. basic probability+stats, basic harmonic analysis, the systems viewpoint in engg.). Training in e.g. Information Theory is not something that one would get out of a philosophy degree (and for good reason). Of course, I'm not saying one cannot pick up this knowledge later, but the perfect undergrad major to go to grad school for X is X, or some closely related X', not philosophy. The one with most flexibility in STEM is likely maths, (and maybe EE/CS or physics), but only if you're interested in theory. A maths degree is basically useless if what you want to study is, say, synthetic chemistry or mechanical engg.