"Flail in space" has the same problems as any other melee weapon in space. The first and most obvious one is simply that distances are enormous. Even in a relatively tightly-confined zone, like planetary orbit, you're just not going to be very close to things very often - and when you want to get in close, you'll have to spend prohibitive amounts of energy to get there. Any currently-available method of propulsion means you probably only manage one intercept per vessel; unless you've got an Unobtainium powerplant, you might as well just acknowledge that your spaceship is in fact a missile.
The second problem is that in space, there's nowhere to plant your feet. That cripples your ability to deliver effective melee strikes, since the action of propelling your weapon forward pushes you backward just as hard (see pretty much every depiction of zero-g hand-to-hand fighting ever). On the ground (or on a horse), your feet (or the horse's hooves) provide traction which resists this effect, allowing your swings and thrusts to be effective.
The third problem is that in space, there's nowhere to plant your feet - this time after the hit. The force of impact works both ways, remember: not just from weapon to target but also from target to weapon, and then from the weapon back up to your own ship via whatever kind of attachment you're using. This is very likely to result in wildly unpredictable inputs to your course - and depending on the relative masses of attacker and target, could well be worse for the attacker. Also, here we've found an area where a flail/morningstar-type weapon would be significantly worse than most other melee weapons, as the combination of spiked striking surface and flexible connector raises the specter for the attacking vessel of not just one but multiple violent impulses (the impact itself; spikes eventually coming loose; one or two rounds of crack-the-whip as those work back up the flexible coupling) coming back from the weapon to send the ship careening madly off into the black.
Tldr: Melee weapons on spaceships are a Bad Idea. Flail/Morningstar-type melee weapons on spaceships are an Even Worse Idea than that.