Would switching to an eSIM based phone offer any sort of risk mitigation in these scenarios?
To defend against port-out you should enable port protection. The name of such a feature varies by carrier, and T-Mobile seems to refer to it as "Takeover Protection."