Rendering HTML Heading Elements in Twig
Is there any reason you dont use a rich text field like redactor?
You can make a custom config so that field only has h1,2,3 and no links, lists etc.

And instead of having the class "measure-wide" on the heading element you can wrap it.

Something like {{ block.heading }}
Where block.heading is a custom redactor field.