eSIMs are great and all, I really enjoy using Ubiji and/or Saily when I travel.
However, if you get your iPhone repaired and they swap the mainboard (my Lightning port stopped working), then you need to bring another device to the Apple store to re-activate. Also, turn off account security temporarily with your cell carrier.
In sum:
1. Bring a charger and charge cable to prove to the Apple store employee that the phone no longer charges
2. Turn off account migration/SIM swap security
3. Bring a second device (laptop, iPad, etc.) that's already logged into your iCloud
4. Hope for the best (like your partner on your cell plan is still in cell service and can be your second factor, if need be)
While I could restore from iCloud backup (I normally use a cable to back up my phone when I upgrade, but couldn't do that with a busted port, nor would Wi-Fi backup work without a port connection first), I was then prompted to do a 30-minute iOS upgrade (no way to bypass).
So restoring your phone after a repair, is a massive time waste with eSIMs, unless you do your homework and thoroughly prepare in advance.