I just installed the AnyConnect client from my company in order to get the stuff I needed to make OpenConnect work, so I did go through the install and might be able to help you out. This was with 3.1.04063, so keep that in mind as I don't know what's different for 4.0. My company has a Windows cifs share with the anyconnect available clients, but they were in a .pkg format. I extracted them with 7-zip on Windows, then copying that folder to somewhere I could get at from Arch.
Once booted into Arch, I did the following:
To build, download anyconnect-linux64-$pkgver-core-vpn-webdeploy-k9.sh and place it with the sources, and adjust the PKGBUILD pkgver as appropriate. Openconnect Download for Linux (apk, deb, eopkg, ipk, rpm, tgz, txz, xz, zst) Download openconnect linux packages for Alpine, ALT Linux, Arch Linux, CentOS, Debian, Fedora, FreeBSD, KaOS, Mageia, NetBSD, OpenMandriva, openSUSE, OpenWrt, PCLinuxOS, Slackware, Solus, Ubuntu Alpine 3.13.
Now, I don't actually use AnyConnect, but that's what I did to get what I needed extracted to /opt/cisco. So, theoretically, it's a successful install.
I used to sort of be able to use the actual anyconnect client, but only from my 32 bit chroot (I'm on x64). And then something seemed to go awry with /etc/resolv.conf or some other network settings, as the successful VPN connection in the chroot didn't seem to translate into my 'actual' 64 bit environment and thus I couldn't do anything with the internet. Web pages just wouldn't load. Same with a 32 chroot installed browser, though, too... so I'm not sure what the issue was. I could ping, with ridiculously slow return times, but never do anything useful.
Finally I stumbled on this setup for openconnect. That's what I've been using every since. Only re-installed since I was having an issue with certificates. Turns out there's a bug in the version of the anyconnect libraries I was using with openconnect, and the fix was to upgrade. Thankfully my company had updated versions in that Windows directory when I checked, or I think I was stuck. Just got it working and happy.
Let me know if you'd like to pursue the openconnect route and I can share my setup. Let me know if you run into troubles after the anyconnect install. I think I had some futzing required to get it connected even after install. From memory, I think I had to start various things that got installed in /etc/rc.d. Like, perhaps:
Then I would run:
Oh, and with openconnect, I get a complaint if I don't have hal running, so you might need that.
Hope that helps!