Restrict max file name length for cloud backing storage

Nextcloud version (eg, 20.0.5): 27.0.0 RC1
Operating system and version (eg, Ubuntu 20.04): Centos Stream 9
Apache or nginx version (eg, Apache 2.4.25): aio latest
PHP version (eg, 7.4): 8.1

The issue you are facing:

I use rclone to back storage and moving from google drive to dropbox I’m seeing that there are some files with file name too long sync errors. To prevent issues when I finally switch from the google drive to the dropbox mount, can I set nextcloud to refuse sync of files with longer than X characters?

With X being the max supported by Dropbox once I identify what that is.

It would be something for the dropbox app to handle filenames:

However, this app is not released for current versions.
Or this one?