How can I output custom html inlcuding js files
If i understand u want to output custom HTML for module, for smoething like this best practice is to preprocess output with twig template, in twig u can generate custom HTML for your needs and of course attach js and css with libraries.
See: Theme system overview.