This doesn't entirely solve the problem of potentially killing the wrong process though
No but it is a lot less likely for a PID to get reused on accident within a new PID namespace.
It's really no less likely, namespace or not. There are better mechanisms for handling this situation, pidfds for example.
But it's worth mentioning because it can mitigate the problem you've laid out. If you have a long running process that may need to kill its children, you can start with within a new PID namespace such that it may only kill its children (or descendant).