I'm new to the details of AEM. I work on the Marketing side of our website so I make lots of one off landing pages and campaign Hero Sections that the Authoring WYSIWYG can't handle (I can't seem to do pixel perfect with a WYSIWYG). Is it best to just create a component for the page or section that needs custom HTML, CSS, and JS? Or is there another way that is preferred? It seems like the components will pile up pretty quickly this way.
I think, before jumping into creating mega component one-time-use components, we can do something better. Let's think about cutting cost, enabling reusability and flexibility.
Can we break down the creative into reusable components?
Can a group of reusable components achieve the same outcome, based on the creative?
If we can strategically create components to shape up the marketing team's landing page, their team can be the ones who create the pages themselves, and since the marketer's components are flexible and robust, they should be able to add styles to whatever their heart contempts.
But... if you really need to create that mega component one-time-use component, then is my suggestion:
In AEM richtext component, you can add HTML but scripts are not allowed as soon as you save, it will remove script tags. Its due to security rules in CORS configuration that can be update not sure if it will still allow scripting tags though.
embed is an option to be considered if CSS and JS required that are not already part of your component designs.
You can always use HTML Markup editor mode in richtext component to paste HTML snippets. The disadvantage is that the edits on it are not a marketer change, but a developer change. But, as said, if they are one-off sections, this should suffice