Since you already posted in the Calibre Editor sub-forum.
you could just Move the files placement order (up or down)in the
File Browser (a window in the Editor).
Just drag the highlighted piece to its proper (order) place.
This
assumes 
you did not use the term MERGE to mean make a huge section file in the book out of each (FF) piece you added (inserted into the
book)There is absolutely no reason for EPUB/AZW* files to be made from a single huge file (inside). The Editor S&R scope setting can determine what files are operated upon). If you did make a huge file out of piece, ask if you need help using the
Editors (not to be confused with the plugin the splits books) Split function
The TOC editor tool, allows the TOC to adjusted any order / indent you see fit