A somewhat okay id pair system if you have less than 8 pairs!
Supported Versions:
26.1.2+
Tutorial Steps:
Row 1 does not use id pair score.
Row 2 uses the id pair score but then only checks the nearest one.
Row 3 uses id the pair score but involved RNG due to random causing some pairs to have longer delays.
Commands by Row:
Row 1
1. [impulse] /execute as @e[tag=mainStand] at @s if entity @e[tag=secondStand,limit=1,sort=nearest] run tp @e[tag=secondStand,limit=1,sort=nearest] ^ ^ ^1
Row 2
2. [impulse] /execute as @e[tag=mainStand] at @s if score @s x = @e[tag=secondStand,limit=1,sort=nearest] x run tp @e[tag=secondStand,limit=1,sort=nearest] ^ ^ ^1
Row 3
3. [impulse] /execute as @e[tag=mainStand,limit=1,sort=random] run tag @s add processingStand
4. [chain] /execute as @e[tag=processingStand] at @s as @e[tag=secondStand] if score @s x = @e[tag=processingStand,limit=1] x run tp @s ^ ^ ^1