So I ended up with a system that wouldn't finish to boot because I've successfully changed 'maxfiles' to ... zero - actually disallowing the operating system to open any files. And thus, having a hard time to do anything useful. Including being able to revert my most intelligent change ...

The usual way of undoing this unwanted change is to boot off some rescue system, mount the file system in question and vi into that file. The challenging part (for me) was to do this on a Mac with an encrypted root partition, instead of OpenBSD or Linux. To be honest, I am not much of a macOS hacker so all you read below is basically a list of successful Google searches.

Step 1: Recovery mode

To get into a console / terminal you need to boot into recovery mode first. Press COMMAND-R until the Apple logo appears. From the menu you can now run the Terminal.

Step 2: Find the UUID of your encrypted volume

Issueing the command diskutil cs list will show you all CoreStorage Volumes present. The Logical Volume in question is the last one, nested under Logical Volume Group => Logical Volume Family => Logical Volume. Note that each entry has a so called UUID.

Step 3: Unlock / Mount drive

The last volume in the hierarchy shown is the one you'll be wanting to mount. Issue the command diskutil coreStorage unlockVolume <UUID> where UUID is the previously mentioned ID of your encrypted disk. This will prompt you for the decryption password, unlock and mount the drive.

Step 4: Edit / Removes relevant files

You'll now be able to access your root file system. You may want to issue mount in order to see under which directory it has been mounted. Fix it, reboot and you're done.

I was glad to learn that this SOP would also work under macOS. Some kind of a Unix, at last.