The OED etymology of the word relates "crib" to a container: A common West Germanic noun: Old English crib(b) (feminine) = Old Frisian cribbe , Old Saxon kribbja (Middle Dutch cribbe , Dutch krib , kribbe ), Old High German chrippa (Middle High German and modern German krippe ).
1 a. A barred receptacle for fodder used in cowsheds and fold-yards;
1847 F. Marryat Children of New Forest I. v. 94 The animal could move about a little and eat out of the crib.
The OED continues along the "food container" vein:
Supposed to be etymologically related to Middle High German krebe masculine basket, which may again stand in ablaut relation to korb, corf
I suspect that the link for "crib" in the sense of "lunch" is between the container for cattle food and the container for human food - and hence, by extension, the food that was in it.