I have a similar story. Once I rented a car from a budget but fairly popular local rental company. They were cheap because rather than renting from the airport, you had to take a 15 minute bus ride to a business park.
When returning, I arrive 5 mins before closing (traffic) to find the entire business park locked up. My phone is dead as the drive took much longer than expected so I couldn't call their head office or anything. While waiting outside thinking what to do, the gates opened and a car came out. I tried to signal them down to ask for them to hold open the gate for me but they just drove off when I got close, so I got back in the car and quickly drove back in as the gate was closing and very nearly scratched the side of the car on the closing gate.
Inside, the business park was completely deserted so I just parked the car beside the rental company's portakabin and posted the keys through their letterbox.
I walked back to the gate and realised there didn't seem to be any kind of button to exit the business park without a key or fob, so I was stuck. I wait about 45 minutes to see if anyone turns up, while looking for some kind of pedestrian exit, but find nothing. Without a phone, I realise the only way I'm getting out tonight is to climb onto the roof of one of the portakabins and try to climb out using one of the overhanging trees. Somehow I manage this without injuring myself too badly.
Obviously no rental company means no shuttle bus, and no phone means no cab, so I just had to trek the several miles back to the airport, using the light pollution for direction.
Next day I get a return receipt emailed through from the rental company, so it all worked out in the end.