Accessing TopDocs from a LeafScoreFunction

Would that be possible?

Yes but that requires to add a custom rescorer that is able to programmatically creates a query from the TopDocs. Currently you can only define the query that is run on the second pass but with this change you could create a query that depends on the TopDocs returned in the first pass. It's just one idea to solve your problem but I think we need to discuss more internally to see what could be done. Can you open a new issue with a feature request explaining what you want to achieve with your plugin (sorry I know you already opened one but this one would only describe the expected feature rather than proposing a solution) ?