Heh - I was just looking into it too. In a quick test, this hides the H1 option in both the markdown and rich text composer:
button[data-name="heading-1"] {
display: none;
}
(I may just keep this! I don’t see much reason to offer H1 in the composer.)