Don’t eSIMs solve this problem for tourists?

Apple — and now Google — have "solved" this problem for the government by removing physical SIM slots in US iPhones.

Thus eSIM

In what way? Activating it still needs KYC.

eSIM doesn't change local laws around cell phones - it's not magic.

It can if it's a roaming eSIM. I'm sure all the countries mentioned here e.g. Australia still handles US SIMs roaming there fine even when the US SIM dossn't have ID tied to it.

A roaming eSIM would work the same way as a roaming SIM. Just because it's easier to set up (no need to get a physical SIM) doesn't change the regulations around it.

I suppose this depends on how the law is written, but are roaming users subject to local SIM regulations for network use? I can't imagine asking for ID from tourists using their existing SIMs is going to work.

I believe some travel eSIMs are actually issued from outside the country you're going to.

Typically not. Because they don't have local phone numbers nor IP addresses, so they cannot be used for scams or fake identities domestically. In China, roaming SIMs also bypass all internet filtering, it's basically a built in VPN back to your home telecom.

And as you said, ones marketed as "China travel SIMs" are typically issued from Hong Kong. Interestingly, Hong Kong also has an ID rule (though it allows self upload of ID anyway), but it exempts these roaming-only cards. If you want the card to work in HK, and it is issued from there, you must scan your passport to activate it.

Yep, they'll still prompt for the info.

Doesn't an eSIM link the SIM to the phone's IMEI which is usually logged somewhere?

Yes, eSIM doesn't really change this conversation

Only if you do not require voice service.