JavaScript isn't from nature. It could have been designed so that it didn't enable those things, but it wasn't. It's probably more accurate to say the ability browsers grant JavaScript is to blame, but that's just splitting atoms.
It's not possible for a system that can communicate remotely to prevent tracking on some level by using unique IDs and fingerprinting even without JS. It's also not possible to have a programming language that can't also be used as a coin miner, it's just a CPU based operation and there's no way to discriminate between user desired computation and exploitative computation. Your point about pop up ads is valid in that JS does not need to be able to influence the state of the browser in that way, this is the only example that crosses outside of the sandbox.