There is no signal that is sent out when the 3PLAY reaches the end of a clip.
I see a two main solutions for this.
1. As I mentioned, you can set timing the macro for preset amounts of time. As you mentioned, this might not work in all cases, specially if you clips are often not the the default on button marking length.
2. Make two macros, one to start the start the replay and a second to end the replay. This will reduce the 'replay dance' down to two buttons and will handle any length clip.
There is a third method if you are into software programming, where you get the metadata from a 3P1 system and then have a program figure out the timing to send commands to both the TriCaster and 3P1 system, but this wold take some work.