Hi Stephan! Welcome to the Anvil community.
The HTML and script can go in a custom HTML form. Then you can use that as a custom component wherever you would like. What I did was make an HTML file in the app assets and put it there. Either way it works.
I made this for a defunct project where users would be able to listen to audio and transcribe it. Similar to the Mozilla CommonVoice project.
Because it’s defunct I don’t mind sharing the app. There are some connection strings and secrets in the app, but they are all dead now so no infosec issue.
Here is the clone link so you can see how I did it.
https://anvil.works/build#clone:SRMAJ3257NG3RIMD=JP3XLNH47KAAJYP2XXVCKLXI