Ok to have junction box hidden behind recessed lighting?
Accessible is a somewhat relative concept. You need to fully remove a recessed fixture from a ceiling to access the connections.  This is a bit more difficult than pulling a switch to get at the wires, or even dropping a canopy style fixture, but it does meet the criteria of accessible.

But one of the main rationales for the rule seems to be to ensure a troubleshooter knows where all the connection are, that none are truly buried in the walls where they can't be found. 

I don't know if the code has considered your solution, but it sounds like the box you are suggesting is buried, even though it is attached to the recessed fixture. In a sense, you are modifying the fixture in a way not contemplated by the manufacturer. But it might pass muster with some inspectors since it sounds like the junction would be accessible if you removed the can.

There is another way that might suit. The code now allows for certain in-wall splices that can be buried, such as these.



The old wire is inserted into one section of the device, clamped, and screwed in. A new wire is inserted into the other. The halves then snap together and the resultant splice can be buried in a ceiling or wall. If feasible, the completed clamp should be attached to a framing member, but I don't think the code requires it if the wire is left in an unaccessible area.

You could attach this splice to your old wire and run a short extension to your can.

 Images and links are illustrative only, not an endorsement of goods or sources.