HTML blocks are part of the commonmark spec. The overlap between people who post too much in issues and know this feature is probably small though. Other platforms have JS that detects long code blocks and collapse all but the first few lines by default.
Also yes it is a "hack" and not official markdown, but for the use case I mention it has the huge advantage to not make tickets including all the comments excessively long