Like other people have said, you'll want to trip the limit switch as it passes right before the endpoint, but not at the end point. Momentum should carry it over a bit if you have your motor controllers set to coast, and you can set a timer of some sort to count before it goes backwards. As for what material to use to trip it, try a decently thick zip tie/ wire tie.
Code-wise, it could look something like this in a CommandGroup:
Code:
addSequential(new MoveArmForwardUntilLimit());
addSequential(new WaitCommand(0.5));
addSequential(new MoveArmBackwardsUntilLimit());