Text this: Enhanced Q factor and robustness of photonic bound states in the continuum merging at locally bent trajectories