Nope, IMAP can't provide the kind of smooth reliable experience that the Fastmail mobile app provides. Now they obviously could have done it in many different ways, but I know from experience with IMAP that it can't do it.
The amount of times IMAP has resulted in duplicate emails when moving mail between folders for me is enough that I eventually gave up on attempting any kind of organization back when I was last using it.
The amount of times IMAP has resulted in duplicate emails when moving mail between folders for me is enough that I eventually gave up on attempting any kind of organization back when I was last using it.