Could you expand on the hypothetical? What would you program?
In particular (asking anyone, not just you) what would satisfy the same "needs" as these coding strategy games? Programming here is not an end in itself, but a means to encode your tactics and strategy, that you can then observe facing the "real world".
Rephrasing this a bit, I do also find myself to enter my "work-mode" playing these types of brains, and I too would rather do paid work if it's going to be like that. It's not fun for me knowing that I'm essentially exploiting myself for no reason. I'd love a game like this however that developed niche skills. Maybe a game where you move your unit by writing a weird, complex bash script for something.
Or a game where you have to rewrite a perl one-liner in python before the bomb explodes or something. That could be sorta fun for me.
I mean, if I I'm understanding what you mean by this, it just feels too much by productivity. Writing a service to read from and endpoint and calculate some probabilities and output some action, that's just work. It's not going to make me a better or worse programmer. Teaching someone bash-fu, helping programmers remember flags for grep or curl, these are useful skills that could be gamified just the same as bot/agent logic.
I think too that these games always kinda fall into a state machine pattern. I don't need the expressiveness of javascript, the bot will end up being a state machine with different states, and it'll just churn through it's inputs. It's always kinda of the same ultimate end pattern.