Expanding my comment and those of others to a full answer seems to make sense now. The short answer is, as Ellen Spertus notes, there is no reason not to, but it isn't enough.
Young people need good, and honest, guidance about what they might expect from their choices. But the future isn't necessarily determined by things we can see at present, so in many ways the best advice to a student is to "be flexible." Their future will be determined both by circumstances and by a series of choices that they make; not just one choice.
Right now, tech salaries are high and job opportunities abound, but a secondary school student's career is years, even decades, away. The world is not likely to look the same over that period of time. In particular, advances in AI may make many software development roles obsolete. At one time, a huge fraction of people in the US were involved in farming. Now it is a tiny fraction. The same is true in manufacturing. While we still have farmers, most farming is managed by giant corporations employing unskilled and low-paid workers. The same could happen in computing. While there will likely always be a need for software development, it might, in the future, be entirely managed by a very small cadre of highly skilled folks.
One of the trends in evolution is specialization. Organisms become more and more specialized to their environment as long as it doesn't change. However, when the environment does change those specialists are normally wiped out and replaced by others better adapted to the new situation. If you know one thing well - better than anyone - you may be well placed in some environment, but if it changes you are lost. However, if, along with specialization, you also foster generalization, you are better prepared for change.
This is why a liberal education which includes some specialization but a lot of generalization is such a good thing. If you can be good at two or more things you are probably better off than if you can only do one thing well. But, even more important is an attitude that your education won't end at some determined age or milestone. If you truly believe that you can and should learn throughout your life, and learn things sufficiently different from what is needed in your profession, you are well placed for most foreseeable futures.
I have an unproven theory, that in the real world, most specialists have a boss (or a boss's boss..) who is a generalist. The one who knows a lot of things and can see the bigger picture is likely better placed to lead than the one who sees the world through a microscope. If you teach, it may well be that the least technical person in your course will end up being the employer of your uber-geeks.
However, those with few resources, have a different problem. While it is great to say Do What You Love, you also need to temper it with Do What You Must, or even Do What You Can. But even if you need to compromise for monetary or familial reasons, the attitude of a lifetime of learning can still benefit the individual. This is, more or less the mantra: Yes I Can.
Also, for those in unfortunate circumstances collective action and mentoring by peers and others is especially needed and especially powerful. If "daddy" is a millionaire you can probably do what you want, but if you come from a more modest background (as I did) you need to gather the resources you can - mostly other people.
On a personal note, I studied Mathematics, but wound up in CS. I might have wound up as an actuary, but it sounded boring. I was meant to do mathematical research, but never really got the chance after I finished my doctorate. Up until about two years before I finished, the job prospects for mathematicians were fantastic. Like CS today, there were lots of jobs and good salaries. But it all fell apart in about a year. When I finished there were no such jobs - none. Several hundred applications resulted in no offers, though I was well respected at the time and wrote a very nice thesis. But I really wanted to teach, and so took a job that I was, in many ways, overqualified for. But it kept me in the profession, even though I had to change fields. I never programmed a computer until after I had a PhD. But I knew how to learn and how to work hard.