only ways i know that bypass Udomxai:
(1) once, some guys rode a trail that branches off eastwards from the Luang Namtha-Udomxai road & ended up at Ban Boun Tai. took 2-3 days, they did it by bike, very very rough trip, not easy to find food, & they had to spend a night or two in villages they found along the way.
(2) take the Luang Namtha-Mengla bus into China, then at Mengla i think there is a Phongsaly bus. but, only for China & Lao citizens. & i was told that China citizens from certain provinces may not be allowed by their own government to cross at all.
i don't mind Udomxai, nice views from top of two hills, nearby Muang La is pretty, good place to stock up on kip before heading into Phongsaly, & can guarantee a seat for the long journey on the Phongsaly bus if get to the bus station early enough.
alternative to Udomxai-Phongsaly bus: take a bus to Muang Khua, then a boat to Hat Sa, then another bus (~2h) up to Phongsaly town.