Hiking wise i've never had to camp out unexpectedly.
Been backpacking and was not able to make it to the planned camp because of illness, injury, weather, no real worry as i had my tent, sleeping bag, food water etc with me.
For day hikes though i've always managed to limp back somehow.
Had to ride back 12 miles to the car in Scotland when i crashed and broke my thumb many years ago.
Only recently i crashed my mountain bike up on the mountain near my house, and had to ride the 4 miles or so home with a broken arm.
The bone was sticking out and i knew i would have a plast on for at least 4 weeks, so i had a shower when i got back home, then drove to the hospital.
Funny thing was i figured i'd go to the same hospital my brother-in-law went when he broke his leg as they were fantastic, but i didn't know where it was, so i stopped off at his garage to ask.
When i showed him my arm he passed out and hit his head so we sat in ER together
Many many twisted ankles, even concussion once or twice but my homing spirit seems strong enough to pull me back home.
I'm out most nights up on the mountain walking the dog and i take 2 torches with spare batteries for each, i also have a keychain torch if all else fails.
Might be worth investing in a quality torch and some spare batteries?
Most nights you really don't need a torch on the mountain on some of the larger paths, but on the smaller ones they are extremely treacherous as they're a mix of marble polished by years of use and jagged rocks that have eroded leaving razor sharp edges and holes big enough to swallow my leg up to my knee.
Plus if im honest io enjoy faffing about with torches
Been caught out many times on the motorbike and in the car from bad weather or mechanical failure mind.