I do get your point, personally I use a zettelkasten numbering approach for organizing the order of some notes in my obsidian publish
the part that I’m not sure how it could be addressed is what you said on putting files that are in folders above files in the main folder.
I think you are thinking in terms of how a website sidemenu works, but obsidian publish isn’t a customizable website maker, it’s more of a simple public foder of plaintext file with a cool style.
I say this mostly for some of the limitations to be kept in mind about publish.
however the arbitrary organization of files is interesting, not sure how it’d work, and it probably won’t be completly flexble, butg it’s an interesting idea.
perhaps if there was a way to determine numbers in the front matter of the note
---
order-number: 1
---
then obsidian could read tha data to sort it based on those numbers.