Ok I got it worked out - was trying to make it all too complicated I think...
here is way ended up getting it to work for anyone interested.
_boat = _this select 0;
#damBoat
~5
?(damage _boat)<=0.9 : goto "damBoat"
_allonboard = units(group _boat)
{unassignVehicle _x} forEach _allonboard
_count = 0
#eject
(_allonboard select _count) action ["EJECT",_boat]
_count = _count + 1
~0.2
? _count != count _allonboard : goto "eject"
~10
_boat setFuel 0
Exit
my main stumbling point was this line
_allonboard = units(group _boat) I was using group instead of units
So not really a detach problem after all.