Ok, so I've eventually found a way to do this, which is fairly straightforward. This follows this Microsoft Support article on how to create stationery for email messages. I think the Insert File > Insert as text feature has been removed from a recent version of Outlook and is no longer suitable as a solution.
Draft an email message in the Outlook desktop app
Please a small text placeholder where you want to insert the HTML code snippet (e.g. "[HTML goes here]")
File > Save as... select "HTML" as the Save As Type, and save to folder "%appdata%\microsoft\stationery" with a sensible filename
Find the saved .htm file in File Explorer and edit it in Notepade or Visual Studio or editor of choice
Find your text placeholder in amongst the HTML code of the stationery file and replace it with your code snippet. Save the file
You can now send an Outlook email that contains your custom HTML code by going to Outlook > New Email > Email Message Using > More stationery...
You can also configure Outlook to send all new messages using your stationery template too if you want to.
I hope someone finds this useful :-)