How about this:
{{ with .RawContent }}
{{ $content := . }}
{{ $content = replaceRE "\\s*\\{#[^}]+\\}" "" $content }}
{{ $content = replaceRE "\\n" "<br/>" $content }}
{{ $content | safeHTML }}
{{ end }}
https://plain-text-output--hugo-mwe.netlify.app/posts/hello/