Calling a CPF a "tax ID" is a bit misleading, much like calling an SSN "the way you get social security benefits". You can (even as a non-citizen) get one in a couple mins at the post office, and it's used for literally everything, including things like buying a SIM card or registering for some public WiFi hotspots.
Okay, that's quite a bit less bureaucratic than American EIN, ITIN, or SSN (collectively known as TINs).
How many digits/letters long is it? One problem with American TINs is the entire space is only a billion digits, so it's not possible to assign one to every person in the world. If we could add two more digits or make 3 alphanumeric, it would be a lot more feasible to do this, but that is basically impossible at this point.