Hello Alvaro,
thanks for sharing the configuration, works perfect for me.
You have a similar config for nextcloud in Caddy v2 configuration: Nextcloud Docker PHP-FPM with rules from .htaccess
One difference is in the immutable cache-busting.
Here you have query s=* and for nextcloud query v=* (same for static files)
Why different?