Get predicted socket location

I am trying to use IK to move the hands in a ledge grab animation onto the ledge correctly (mostly to handle going up and down slopes), however I am having some difficulties.

I am currently using a line trace to get the height of the ledge, however I cant find a way to offset the value with the animated height of the hand (I cant use a bone space IK because of the way the animation rotates the hand), this results in the hand sliding along the ledge rather than lifting up while its moving.

I am not sure if I am being clear, but essentially what im asking is how do I get the position that the animation should put the hand if the IK weren’t active.

Also open to suggestions for other solution.

Currently doing something similar myself.

Not quite there yet, but I found some interesting sources: