Restrict Rigidbody movement in the Z axis

I have an object that rotates in the Z axis. For convenience lets call it object A. When object A collides with other objects I want it to spin in the opposite direction. But because of the way force/physics work, once it collides with other objects the impact from the collision caused the object to move/rotate on other axes. I want object A movement/rotation to be completely restricted to the z-axis. The easiest to do this is to use trigger collider or set the rigid body to kinematic but then another problem arises. If I use kinematic then I’m unable to use continuous dynamic for collision detection so when object A rotates too fast it goes through other objects because simply put there’s no collision. And when I use a trigger collider, its the same problem, the large movement from one frame to the next cause the object to pass through other objects.

p.s. don’t tell me to use continuous speculative because that doesn’t do jack shit. With that being said thank you for taking time out of your day to help me.

You seem to be using Rigidbody to some extent so why don’t you use its Constraints property? You can check the Freeze Rotation for X and Y. This will only allow your rotations in z-axis. Just set them in inspector.