To me the introduction of the race that apparently wiped out thousands of Borg ships in the past and still hate the Borg is setting up a classic
"deux ex machina" I think it is called.
Close: it's "deus ex machina," which is Latin for "god from a machine." It derives from Greco-Roman theatre where a god would be introduced into the play to resolve the entanglements.
It has come to refer to "any artificial or improbable device resolving the difficulties of a plot," as defined by Dictionary.com.