You are correct in all of your assumptions. This is the single biggest way riders get nasty surprises when it comes to the bill. You would think Uber would recalculate on-the-fly and let riders know the updated cost being a tech company and all but.... You also must bear a shred of responsibility here however. Uber now offers a "multiple stop" feature, so if you had properly planned the trip upfront, you would have received an accurate upfront pricing quote.
It would have been in your best interest financially to request another ride at the first destination, assuming town1 is not in the boonies and there are no Uber cars there. In fact, this is a common scam riders do to drivers to get them to end the trip and then say "wait wait wait!" and try to request a new ride without surge or offer to pay cash. Friendly reminder to drivers - do not get in the habit of ending a trip until all riders have exited and closed all the doors (then lock them and drive away).
It would have been in your best interest financially to request another ride at the first destination, assuming town1 is not in the boonies and there are no Uber cars there. In fact, this is a common scam riders do to drivers to get them to end the trip and then say "wait wait wait!" and try to request a new ride without surge or offer to pay cash. Friendly reminder to drivers - do not get in the habit of ending a trip until all riders have exited and closed all the doors (then lock them and drive away).