I am a Mechanical Engineer, so I’m biased, but I’d first look at a way to counter-balance your arm so that without any motor power it stays in the same place, be the a literal counterweight or springs of some kind.
Beyond that you could calculate the torque needed by the motor (find the mass of the arm, find the distance the center of mass [the point you could balance it on a pencil] is from the sprocket, multiply them together to get the torque at the sprocket, divide by your gear ratio to the motor, and cross reference that to a graph of motor torque vs power) … or you could just find it out by trial and error (start at 10% power, does it stay? if yes increase by 10%, if not decrease by 5%, repeat until it stays put).
Do note that how far the arm is rotated (e.g. level with the ground vs pointing at the ground) will change what the motor power will need to be. If you want to do it right you’ll need some kind of feedback (encoder/potentiometer) that will tell you where the arm is, so you can do math and calculate the needed motor power.
The third option is to put a worm gear (like the window motors have) as one of your stages. They’re non-back-driving so gravity pulling on the arm will not be able to turn the motor, but the motor can still move the arm.