Hi, VDS!
I think that there's no simple or direct solution for the combination of merging cells and sorting a range by a merged cell column, since as your were told upwards all the other values in each merged range are lost except that of the 1st cell. My advice? Forget about a worksheet like that of your posted image. Or build it manually and forget about sorting.
Regards!