As explained at the GitHub issue thread, this problem was solved in a pull request merged into version 2.24.5. The challenge for a novice user like me was to get a particular Nix version installed.
Over the weekend a friend that is proficient with Nix suggested me to install the software from zero-to-nix. From that website I got precisely version 2.24.5, and indeed the “too many open files” is done with.