CDMA phones (early 2000's) had to be manually configured to attach to a network, I did support for Verizon at the time and I talked many people through the steps of reprogramming their phones onto the network. If you wanted to use your CDMA phone on another network you had to program it and re-program back when you were done. The steps were not public nor easy to navigate as it was not intended to be a user serviceable feature.
Compared to AT&T's "take the card out and put it in the new phone" reprogramming it was night and day.
You can say that eSIM is easier than the old CDMA days but it still isn't as easy as SIM swapping.
Technically, I do not see why eSIM cannot be even easier than SIM swapping.
I go to a conference or hotel, and they can figure out how to have me login to the wifi and pay them. Or not pay them if I am a certain level member of their rewards program or part of a certain group of people attending the conference.
Other than legacy business contracts or lack of will by mobile networks to allow easy switching, it seems it should be just as easy to change which mobile network you are using.
As a side note, I love the cash grab by ATT/Verizon/Tmobile right now where changing your device entitles them to collect an extra $30 "activation" fee from you. Zero labor cost, almost zero compute cost other than changing IMEI in their database, and you still have to part with $30.
Carriers (Verizon and Sprint?) tried to improve it, but never really worked and the expense was high.