It all boils down to street smarts...you never let anyone get close to you when you have valuables (situational awareness), maintain a bit of space and keep your stuff secure even if it's a PITA. When in crowds I always keep my bags partially buckled down just in case and when I need to change lenses I step away from folks to do it.
Learned this lesson years ago growing up in Philly-used to keep my wallet in my back pocket like everyone else until my best friend got his boosted during a shopping trip downtown. After that, my wallet stayed in a front pocket AND made it a habit of keeping my hand in my pocket with the wallet around large crowds. Many years later when visiting my cousins in Tampa one of his friends saw my wallet there and said "aren't you afraid of someone trying to jack you and take your wallet?" My reply-"If the [expletive] wants my wallet he's gonna have to work for it!"