I stumbled upon a post on Stack Overflow which had nothing to do with PowerShell, but someone experienced a similar issue with an HTML file generated from an editor. The poster recreated the file manually and didn’t experience the issue. He made a comment about the encoding needing to be UTF-8. So I edited my script to force the encoding, and it worked!
Now I’m using this to build a script to archive my projects from Trello in a similar manner. 😎