Prepare a set of parameters for reuse in multiple panels
Answer is rather simple, afaik: you cannot.

There may be some ways to cache that result, maybe in scene object, but we do not have any set-like type of property in RNA anyway, and you would have to handle update of it, which would not be trivial.

Note however that I doubt this to be a real performance bottleneck, unless you have tens of thousands of bones…

And you should use context given to panel's draw func, and do not need to use list comprehension to create a set, there is a set comprehension too:

bones = {b.name for b in context.selected_pose_bones}