@Ninjatrappeur First draft of a #DokuWiki cli plugin to extract all external links: https://github.com/michitux/dokuwiki-plugin-linkextractor
Install into lib/plugins/linkextractor and run as
Output should be suitable for piping into archivebox, but I haven't tested this yet. It will be slow if you have a lot of pages. With some more code I could use DokuWiki's index to store external links, then extracting them would be much faster. However, as a daily cron job this might be good enough already.
My approach would be to write a #DokuWiki plugin that extracts all links and then feed that into something like https://archivebox.io/. Depending on how easy it is to get the URL to the archived version, one could also write a plugin that adds a link to the archived version to every link. As I am interested in something like this, too, and I know DokuWiki quite well, I might try to write a quick draft if that approach would be suitable for you.