bore vs stroke

No, stroke directly affects torque by the definition of torque... Force times perpendicular distance... The longer the stroke, the more the perpendicular distance, hence the more torque...

Just like using a pry bar - the longer the pry bar, the more torque it produces...

Yes but your not accounting a smaller pistons is gonna have less force against the longer stroke than a larger piston against shorter stroke.
Stroke is only one part of the equation.

Eg.. A weak man with a longer pry bar vs a strong man with a shorter pry bar could be made to be even depending on the lengths.