Topological transition enabled by composite symmetry-breaking paths in trefoil-knot honeycomb lattices