Sorting of nested categories inside a Common Table Expression
Instead of using some large number base, I'd use an array.

Start with ARRAY[display_order] AS global_display_order.  For each additional level, array_append(global_display_order, display_order).  Arrays are compared element by element; ties are resolved by putting the shorter array first — which is what you want.

For readability, instead of the table aliases c0 and c1, I suggest parent and child.