An encoder would simply allow you to determine the position of the arm (and therefore speed). If you program an algorithm like PID (or even just a proportional controller) to use this information to send the correct power levels to the motors in order to eliminate the “sag” and improve performance of your arm.
If you have RobotC version 4, PID is already built into it. More information on that in this thread:
There are also many other threads on this forum about PID that you could check out, or ask me if you have any more questions.