Now that I think more about it, I could do two things: (1) disable notifications, (2) make it so I disable the blue check and double check and appear offline. It'd effectively simulate logging off.
I'm unsure how you'd do #2 though? There's a permission for background data, wonder if that would be enough? Let me know if you test it!
I'm on Android btw.
The drawback is that this behavior can not be enabled on a per-app basis: either all app synchronize, or none. So I don't have new emails either unless explicitly enabled, or any other similar app. The only thing that still works and notify without requiring the app to be open are text messages and phone calls.
I consider that to be a feature, but other might not.
As long as the app is not open you also won't be shown as online, that only happens when actively using the app.