If I’m following your explanation correctly and if I haven’t missed anything, you just need to cut the tertiary road in two places and tag the crossed segments as was:highway=tertiary.
was:highway=tertiary