Tree-like process tensor contraction for automated compression of environments | Synapse