Word your orders carefully...
If the suggested activity can be completed in a shorter time, the spell ends
when the subject finishes what it was asked to do. - Suggestion, PHB, p279
The key element here is defining your task appropriately. If you tell somebody to do something that has a finite end, they stop doing it as soon as the task is complete.
In your example, the spell ends automatically as soon as the Barbarian reaches the boat. If you want to keep him there, rather than just slow him down with a bit of travel, the appropriate command is "Stay on the boat." As long as the caster maintains concentration, the target will stay there until the spell ends. Even better would be "Guard the boat," because once the spell wore off, the target is less likely to wonder "Why the heck have I been here for eight hours?"
Anecdotally, I've used suggestion to correct the course of a corrupt investigation. In one of the DDAL modules, the characters are framed for a murder. I got close enough to the lead investigator to use suggestion to tell him "We're innocent until proven guilty; do your job the right way." By studiously avoiding situations where she might lose concentration, my bard was able to keep the city guard at bay while the party conducted their own investigation.
Hit me baby, one more time...
If you or any of your companions damage the target, the spell ends. - ibid
The intention of this passage is to block suggestions like "stand still and do nothing" to prevent targets from defending themselves. The entire point of the spell is to make the target do things that seem reasonable.
Pay no attention to the man behind the curtain...
Unless a spell has a perceptible effect, a creature might not know it was targeted by a spell at all. An effect like crackling lightning is obvious, but a more subtle effect, such as an attempt to read a creature’s thoughts, typically goes unnoticed, unless a spell says otherwise. - Targets, PHB, p204
The suggestion must be worded in such a manner as to make the course of action sound reasonable. - Suggestion, PHB, p279
There's no reason for the barbarian to want to stab himself, because he has no way to realize he's under the effects of a subtle magic like suggestion. If he failed to save, he believes he's taking a reasonable course of action.
Attempting to stab himself to get out of the spell is metagaming, pure and simple - using out-of-character information ("the character is under suggestion") to drive in-character action ("the character stabs himself").