I shall leave you with this question: if you were placed in the same situation, and had the presence of mind that always comes with hindsight, could you have got out of it in a simpler or easier way?
Yes. Take up a new career writing IT suspense stories. That one looks massively TL;DR, but had me gripped!