It's a nice little phrase - it basically means that some guards could barely read, but reading one or two words was "enough".
I'll break it down:
"some of them" - the guards
"might have squeezed the concept" - maybe applied their own, tenuous, idea of the ability to read and write
"within an inch of its life" - almost to death / almost to non-existence
The proof of this was the guard reading a children's book.
And to finish off with a quote by Groucho Marx, "I was going to thrash them within an inch of their lives, but I didn't have a tape measure." :D