As I understand, digest_custom_html and digest_custom_text already implement hooks for digest.html.erb and digest.text.erb. So a basic implementation of this request would involve adding more of these hooks?
A more advanced implementation could provide sub-templates, which could be used to supply plugin authors with styling and formatting code maintained by Discourse.
Do I understand correctly that your implementation would be possible with one digest_custom_html("before_preheader") added to digest.html.erb?