Is it acceptable to build functionality into a theme built for a client? [closed]

while agreeing 95% with Drew’s answer I would like to attend to another point

It’s normally advised to not include custom types or taxonomies in
themes as the themes will be less useful to other users, and would not
be accepted by the WordPress theme repository.

The word of the maintainers of the wordpress.org repository is not the word of god and it changes from time to time. What was “Normal” just a year ago was to pack all functionality inside the theme. Both criteria should not be held in too high regards if you are not going to submit your theme to the repository and care more about serving your clients then scoring coolness points in the community.

The issue here is about leaving your clients the option to interchange or remove part of the site’s functionality without losing its design and functionality

When you develop a commercial theme you need to focus on the design and try not to include functionality that can be achieved with popular plugins (for some subjective definition of “popular”) because a potential client might already use a plugin for this functionality and to use your theme he will need to convert or recreate his data.
A great example is SEO functionality that many themes used to include, but it was rarely equivalent to yoast SEO and the only thing it done for the themes is bloating them with code which was rarely used.

A site development is a different beast as your client is rarely interested in the software architecture of the site. Once he accepts the site he is very unlikely to replace yoast SEO with all-in-one SEO on a whim. Software modularity should be based on actual requirements from the client and since clients rarely understand the issues involved, and you need to decide for him.
My rule of thumb is that 3rd party integration like SEO, FB, twitter should be isolated as much as possible since their requirements change all the time, but things that are internal to the site like special post types can be part of the theme as they are essential for the functionality of the design and are unlikely to change without changing the design of the site.