Both CSS and JS can be "applied to specific pages". I put that last part in quotes because MediaWiki (least how Wikia has configured it) doesn't actually let you do that. What you do is write your CSS/JS so that it has no effect on pages other than the target page; but it is still loaded for every page.
If you are using the template on only one page, I am not sure I see what the purpose of having the template is. Generally, you use templates so that you can place the same content and/or format similar content in an identical manner on multiple pages. The only common exception I am aware of is main page content. A lot of wikis use one-use templates to simplify editing the main page.
usually, scripts works when they have something to work with, otherwise they just stops. script authors are not insane, they will not create scripts that will work for 100% of the time, consuming your cpu for nothing.