If you want to use ``` in a code block, you can use a different marker for the code block itself. For instance, you can use 3 tildes or 4 backticks like in the examples below.
~~~
```
~~~
````
```
````
And to be able to post those examples in a code block I simply used a different marker; In this case, it was 5 backticks. Alternatively, you can also indent a paragraph with 4 spaces or a tab and it'll become a code block.
On a related note, I've just fixed a couple of issues with the use of backticks inside of inline code spans. The fix will propagate to Flarum as I publish the next release of s9e\TextFormatter and it gets updated by Composer in Flarum. If anyone's curious, you can see the correct result compared to other libraries on Babelmark 2 here and there.