I've never had any problems feeding them in their cage.
He could have struck at you for many reasons. You startled him, you smelled like food, he was in shed...
BP bites aren't painful, more shocking but not painful. As for how to handle him just pick him up. Make sure not to startle him and make sure you don't smell like food and just scoop him up.