Im convinced it's a stifle problem.
There are three ligaments around the knee(the real one), two to either side and one directly over the kneecap. Usually the one on the inside one is a Tad long. When he stretches the leg completely the ligament catches on the kneecap and his keg is blocked. That usually scares them quite a bit, obviously. Sound after a trim, because the toe is shortened and the hoof leaves the ground faster, means no complete stretching of the leg, so no catching.
Have his hooves trimmed, with a squared toe and a little more heel than normal. That might be all that's needed.
Working him on hills in a trot builds muscle which in turn keeps the ligaments tight.
I hope this makes sense