The only advanced filter term which hides a subtask based on something to do with its parent task is the "ParentName" filter. So, the only way I can think of doing this is to select a character or phrase to put in the parent name (eg "{hidesubtasks}"), then setting up an advanced filter in your ToDo view with the logic "ParentName contains {hidesubtasks}"
You don't need a long phrase like {hidesubtasks}. you could assign a single character in the task name which means you want to hide its subtasks - maybe something unusual like ¬ (which is shift and the key just above the tab, on my keyboard)?
Hope that helps.
Stéphane