They trapped Moriarty and the Countess inside a velvet prison, yes, but with every intention of finding a way to release them into the universe.
I like to think that in the future, they give the two a reverse engineered holo-emitter the doctor uses in Voyager. They know how it works, but they can't yet duplicate it due to technological limitations.
So at some point in the future, some science Ensign is gonna come across the Moriarty Cube in storage and give them bodies. Hijinks will ensue as Moriarty is not happy with having been trapped so long, as he DID eventually figure it out, and has to be reminded of his "humanity" to accept things again. Then they give the happy couple their mobile emitters, and a small ship equipped with emitters everywhere, including on the hull to allow for limited travel near the ship without a mobile emitter being necessary.