Sounds like a really unique mechanic with the gears! As for your bug with things passing through walls: change the Collision Detection mode on the gear's Rigidbody2D from Discrete to Continuous. It stops fast objects from glitching through colliders. Good luck with the jam!