Hi @quanluu,
Unfortunately, these features are hardcoded in the gripper themselves. This means there is no way to overwrite them. Let me know if you have any further questions.

You can stop the gripper when it is closing by requesting a move to the current finger position.
I recommend you check this article explaining how to change the grip force after the gripper stop on an object. It may be helpful for your project.
https://dof.robotiq.com/discussion/2249/adjust-force-after-object-detection-with-2f-and-hand-e#latest
I have a question regarding a technical issue of the 2F-140 gripper.
I am doing research to develop a robotic finger that can send the touch feedback to ROS controllers, and in turn, will immediately stop gripper movement. This developed finger was integrated into your 2F-140 gripper for grasping action.
The problem is that once the TO POSITION command is sent to the gripper, we cannot stop the closing/opening action (when there is an object detected) before it reaches the set (target) position.