Sure, you can modify scripts.js to fit your needs, e.g. add logic that skips loading the header on line 106: https://github.com/adobe/aem-boilerplate/blob/main/scripts/scripts.js#L106
A common pattern is to use metadata properties(global or page level) to toggle certain features. getMetadata() makes...