I can imagine people taking the vaccine proactively (the normal way people think about vaccines, after all) from the perspective of, "I don't want to become an addict, I better take this!" and then later regretting their choice when their options are limited in terms of pain management.
However, if you limit the vaccine to people in recovery, then the harm reduction itself is blunted because the initial adverse event (addiction) has already happened, and this would only affect secondary harms (relapse).
I guess it's better to have more tools in the toolbox, at least, but I'm a bit concerned that these tools might be used injudiciously once they exist.