The download link is: https://[SERVER]/remote.php/dav/calendars/[USERNAME]/[URI]?export
[URI] can be looked up in table ‘oc_calendars’ in your Nextcloud database (prefix might be different from ‘oc_’ in your installation).
I also wrote a bash script that exports calendars from Nextcloud and saves them as an *.ics file. Maybe that can do the work for you. See here: