This could be accomplished by the use of the templates feature. Templates are a collection of sections that are configured to give your online store a consistent look and feel. Editing a template applies the changes to every page that uses that page template. All themes come with a default template for each type of page (collection, product page, blogs, pages, etc.) This default template is what resources use if you don’t have an alternate template explicitly set.
What you can do is create a new product template and copy/paste the default product template code into the new one. From there, you can edit the add-to-cart button for the new template to something like ‘On Demand’. Then, for the products that are ‘on demand’. You would go into that product and change the template from the default to the new one you created: