Just a note, looks a neat solution. Just working through my first attempt and the theme I’m modifying the author has taken a different approach.
Basically created a style.html partial with the intention that is can be overridden ( and does the same with script.html partial for JS )
A different approach but works.