This is indeed an annoying problem.
I think your edit removing some parts of the output which were unnecessary was fine. It was also a good idea to leave a note of what you had removed, because anything you've taken out will always be available in the revision history. I handled your edit suggestion and I actually removed those parts because I don't think they had any useful information in them anyway (but maybe I was overzealous).
This problem also occurs when formatting output from scripts like the wireless info script and boot repair info. Output that is too long can be dumped in a pastebin such as paste.ubuntu.com, but it's always preferable to have the information in the post if possible.
The reason the automatic pre formatting makes the output too long is that it inserts 4 space characters before each line. This adds lines*4 characters to the count. As a workaround, you can use html tags:
<pre><code>lines of formatted text
between the tags</code></pre>
This works without indenting, so you don't need to add 4 spaces per line.
However, you need to check the text, because within these tags, other html tags will still work, instead of rendering literally. For example...
Indenting shows tags:
<pre><code><i>preformatted words</i></code></pre> prints this, when not indented:
So check the text for anything that may cause unexpected text formatting when doing this (obviously it's great when you actually want to add formatting).