I'm aware of esims, but didn't realize you could turn them on and off in the software. It does makes sense tht you can do that. I assume you can deactivate a physical card the same way or just pull the card out when you don't need it, but you do risk losing or misplacing it.You could also use a burner esim on your main phone and deactivate it when not in use.
Even in the case Moonwaiting whose proprietors were charged with human-trafficking, John's weren't investigated (hint: Moonwaiting was most-likely probably busted because of other offences [like the 30+ guns and millions in drugs they had], but LE used the prostitution as the in. Several former Moonwaiting SP's still work in the industry).
As someone else mentioned VPNs are also a viable option (especially if you're ever using a connection which isn't your own - like a work network for instance) to further obfuscate your traffic.
That's more if you're trying to keep private from someone on the local-network or ISP level which wasn't what I was thinking about originally.
VPNs are a good option to encrypt your web activities online, but won't help with your phone number.
I didn't know the details of the Monnwaiting bust, but it doens't surprise me that the cops would use prostitution as the way in. If they want you bad enough, they'll find anyway to get you like Al Capone.