Not sure that is possible, to get stuff in a list it must be indented. I suggest trying this on GitHub or the CommonMark tester.
Another difficulty is that this three backticks code block style is an addition to Markdown, although it is included in CommonMark, not all markdown flavors will support it.
My code from the first post works on CommonMark tester.
It is correctly idented (but not highlighted because as I see CommonMark does not highlight code at all).
So there is a clear difference: Discourse breaks my case №2 (3 back-ticks syntax) and CommonMark tester correctly renders it.