The unfortunate fact is that stuff gets squeezed and jostled in overhead bins. Even if you are watchful as other passengers store their stuff there, and those passengers are careful as they store their stuff, items shift during flight. They bounce when there's turbulence, they slide forward during landing, and they generally rearrange themselves. There isn't a thing you can do about that. It's a risk you accept when you take a commercial flight. You can minimize the risk, but you cannot eliminate it. If there's something in your backpack that will be damaged if something like this happens, the only sure solution is not to put it up there. If you're in a bulkhead row ("but-head?" I like that) you can ask an FA to put it in a closet for take-off and landing.