Why doesn’t any of developers just add this section to nextcloud included .htaccess?
Of course it’s not hard to edit apache config, but this is excess work for users to investigate php options and composing configs
But it is possible to add the setting to the nextcloud vhost into directory directive and thus set them only for the nextcloud folder itself.
Does not solve the issue with shared hostings but could prevent possibly compatibility issues with other web services and you have settings closer together.