O.P.
UK immigration DO swipe the passports of everyone. That includes, Non Europeans, E.U. Citizens and U.K Citizens. Behind that little preachers desk that they sit behind is a swipe for reading the data at the bottom of the picture page. The days of a quick "once over" at the picture by UK Immigration control are gone. Thus the long lines at peak times.
My gut feeling is your ploy of going to Costa Rice for a few days is very risky. Some of the Homeland Security inspectors may have personality bypasses, but they're not stupid and can usually suss when somebody is trying to pull a fast one. They pick up on everything. Recently I crossed from British Columbia into Idaho with my Canadian girlfriend for an overnight stay. (I reside in the U.K & Citizen btw) One month previously, I'd been with my kids in Florida on holiday. Although we'd handed in our green I-94 forms to the check in agent at MCO on leaving the U.S., they obviously hadn't gone through the "system" by the time I returned. According to the computer, I was still in the U.S. Result - A lengthy interrogation at the gate before I was issued with another Visa Waiver. In fairness, the guy could see what had probably happened, but I had to convince him I'd been in the U.K. for the past month by showing him my itinery from London to Calagary a few days earlier.
As you can see, the slightest discrepancy will send alarm bells ringing in the officers mind. In theory, I could have been doing what you are planning?? These days they leave nothing to chance and many people are returned to their point of departure.

OP wants to go to Costa Rica for 5 days just so they can return to the US, not fly directly to the UK.
#31
Yes, I see that his her "plan". I was commenting on her statement in post #8 that should she return to the UK, her passport would not be swiped at Immigration. As I posted in #30, that is not the case. I suspect It's doubtful that she would flag up as an overstayer in the U.S. on a UK system, although I stand to be corrected. U.K. Immigration have bigger local matters to worry about rather then a backpacker who's overstayed in another country.
