This will reinforce bad patterns early on which they will have to unlearn through bug hunting or reading about the edge cases and foot guns.
Python will do that too and without reinforcing patterns that produce UB.
I'm curious if there are any newer alternatives that fit in the same niche.
Of course, that means that it doesn't fit in that niche - it fills it and then some.
The goal of software development is not to write code that compiles, it is to have an executing software system that does the right thing.
But there are many UB-laden, compilable C++ programs that produce the right result, they just are implemented with bad, non-standard, leaky code. Rust and other languages that detect this bad code and force you to remove it are harder to start with, because you need to learn everything to get to a running program.
Interactive development (especially REPLs!) have shown time and time again that it speeds up the learning process. Rust takes the inverse approach imo.