litch0 when I read your message I have the feeling what you're describing isn't what the OP described in this post.
The OP question can actually be solved using custom CSS. Flarum always shows the 3 secondary tags with the most discussions. If those rarely change, you just need to find the ID of those 3 tags, then use custom CSS to hide them from the navigation.
Here on Discuss that would be:
.sideNav .item-tag60,
.sideNav .item-tag19,
.sideNav .item-tag57 {
display: none;
}
If the top 3 secondary tags change often, the CSS could include all secondary tag IDs.
If you are referring to the behavior of sub-primary tags showing up under primary tags when expanded, this is standard Flarum behavior. If this is not what's happening on your forum, make sure you are running the latest Flarum version. If that doesn't help, can you share your php flarum info
output?