Not that I wasn't satisfied with how we got things working again, but someone else I had mentioned the problem to got back to me pointing out this post on reddit:
https://www.reddit.com/r/Electrum/comments/ir9pox/having_triuble_trying_to_install_403_in_linux/, by someone who apparently had exactly the same issue. His/her solution:
uninstall all versions of `yarl` with `python3 -m pip uninstall yarl` (keep repeating the command until there are no more old versions left) and then install the latest version with `python3 -m pip install --user yarl` This allowed me to install 4.0.3 but 4.0.2 was loading up. Turns out I had lots of old versions of Electrum installed too so I went through the same process with `python3 -m pip uninstall -v Electrum` again, repeat until all old versions are gone, then go ahead and install the latest version.
Out of curiosity I tried it on an earlier backup of the VM, and sure enough, it got rid of a bunch of versions, all the way down to 3.3.4. Upon which, installing Electrum anew using the Terminal commands resulted in a perfectly functional 4.0.3.