How do I include an HTML element to Database / Dynamic page?

The src-property of the html-component expects a URL. You don´t have one, you provide the html from a collection. In that case, your only option is to postMessage the “Code” to the html-component. Look at a very old, but similar example here: https://girizano.wixsite.com/codecorner/post/html-component-not-running-in-publish-mode-google-sheets-example