I’m a fan of some of the math problems on Project Euler. This isn’t high school math, of course, but many problems are carefully designed such that blindly using a computer to solve them just doesn’t work. This forces you to think about the problem more deeply and use that to come up with tricks that reduce the search space. This is very much along the same lines as this blog post, but generalized to bigger harder problems.
And FWIW, stuff like this - a deep interest in math and how there are often many different ways to solve a problem, and the study of digits and numbers and polynomials and roots and efficient ways to manipulate them - is quite core to my job and all the people I work with. I do mostly software at a company that makes hardware and software, and number-theoretic thinking and fun & “impractical” tricks put into practice are literally everywhere.
I guess I’m saying I think that there actually is a lot of practical value in this kind of play, for the engaged audience, and once someone goes beyond basic high school & college math, in addition to the benefits of increased motivation that you mentioned. I wouldn’t be so quick to write it off as pointless, and only teach to the test. Maybe if we had more of this in high school, we’d have a better math education system. I’d agree we need to teach all kids how to use calculators, but I also think we need to teach kids how to think deeply about numbers, and have the skills to build tricks and do mental estimation, and send more of them into science and tech jobs with exploration skills emphasized and prioritized over calculator skills.