In general there is no hint which move belongs to which object that is why we have the region solution. They also normally do not overlap or slicers will normally complain, but it can be hard to say where they will end.
If you modified marlin and you know which object has which id and used that postprocessor adding the required marker you could send that command. You can send commands during print so that would not be the problem and since server is not really involved except sending the command you can use that.