Alright, so for OP’s sake I tried a little experiment. I tried signing in to AT&T’s mobile app on a “new” iPhone. It’s really my old iPhone but it doesn’t have my AT&T login stored. They need 2 factor. Great, let’s see the options. It can send SMS to my normal number. OK but if the phone was dead, then I can’t get it. I turned my normal phone off. Then I can send a code to my cellular Apple Watch. Not good! You send one to the Watch, which has a phone number you can‘t get texts on, so you won’t be able to get it. You’d need maybe a separate phone line to send to on the same account, so if you have a partner you could use their phone. But what about my Google Voice line? Not there. Email? No option. I think you can reset the password but signing into a “new” device needs your normal phone line. Oh, and I talked about Wi-Fi calling on other devices? No help! Doesn’t have a “receive a call with a code” option. I thought it might because some banks have that or SMS as options.
So yep, looks like it’s an issue, you can’t really sign in unless maybe you get another line of service with them, and it’s not an Apple Watch or iPad (since neither of them can receive SMS on their “native” phone number, only forwarded phone number SMS, and forwarded SMS requires the phone it’s forwarded from to be on the internet). I guess it would be fine for a couple or a family with at least 2 people on one account. And I don’t think you can change these options to non-AT&T numbers or email for 2 factor, I think they use phone numbers on the account for 2 factor, the other options are for password recovery but 2 factor sign in doesn’t present other options than “send SMS to phone number”.
Ouch! So I think OP you may be out of luck if you’re the only number on the account, you lose the old phone (it’s broken, you remote wiped it, etc), and you want to get an eSIM remotely. I guess you would have to wait till you return.