1. Keyboards don't beep.
2. There are lots of more reasonable explanations for text getting deleted than "state agency wanted to play a juvenile prank on me and be glaringly obvious about it". A stuck key, an intermittent short across some of the leads caused by the coffee he spilled all over his keyboard (conjecture on my part), a glitchy keyboard controller -- we've seen all of these in our shop.
3. In Rio, "a tall American" immediately meets a fellow Westerner and "accosts" him -- by suggesting they go out and see the city? He's a spook because he dressed neatly and was in good shape? Hell, that makes me a spook too.
4. Choose one of the two following explanations for the iPhone behavior: one, a well-funded and resourceful state agency is hiring people to track a journalist writing a book about the biggest intelligence leak in recent history, and the people they're hiring are juvenile enough to use methods straight out of Hollywood to play a prank on their target's iPhone when he sends a text with possibly the most milquetoast insult about their methods in the history of ever; or, two, the iPhone crashed. (Your answer might be used to gauge your sanity.)
5. The hotel safe -- if it weren't for everything else he'd written, I might be willing to buy that this was a botched job. But in the context of the rest of the article, I think the more reasonable explanation is that it was a crappy safe, it never did work correctly, and he only noticed that part way through his stay in the room.