In my experience, well maintained shifters don’t up and die. They might get gradually worse and less precise. Usually fixed by a bottle of tri flow and a puddle on the floor.
Certainly nothing that won’t make it the 15 miles home in this scenario.
Theres a lot of good advice here about getting home if you break a cable. The best being the line about regular cable replacement.
I’d carry a fork or seatpost before a new shifter, if I was one to carry things that might break.