There's a mechanical problem with your lever. The only way to get from this:

to this:

is to first move point #1 slightly to the right, to fully extend the joint, before moving it back to the left. Look closely at the bottom right pivot at the start of this animation, as it moves very slightly to the right:

If you wanted to keep this motion and rig it with IK, you'd need a poll target that flips sides at the moment of full extension. By default, this will flip the y-axis rotation of the bones, flipping the meshes:

so you'd need to also keyframe a sudden 180 degree rotation of those bones around their y-axes to match the pole target change:

It will be difficult to get smooth movement with this rig, so I think I'd rig it differently if this was the desired motion.
Assuming you don't want this right-then-left motion, find a way to adjust your mesh so that the joint between the bones starts at an angle that's already in the right direction. In the following animation, the meshes and armature have been redesigned so the "elbow" is bent ever so slightly downward at the start of the animation, and the IK rigging works as intended with no weird hacks:

Here's a Blend file illustrating my setup.
