Also, if your system needs that many/much scripting to "automate" it. It's not a very good system in my humble profressional opinion.
Your professional experience does not include systems integration, then.
Linux and BSD kernels are only a small part of the operating system. The majority comprises of services running in userspace. These services need to be managed, or at least started up; the kernel only initializes/executes a single userspace process as PID 1 called
init.
To do this management, you have exactly two approaches: either you use a monolithic service supervisor, or you use a set of event-triggered scripts that are executed as the events occur. (The technologically best solutions I have seen, are a mix of the two.)
Some init systems in Linux and BSD are
still based on scripts, regardless of whether they use a service supervisor or not, because it turns out to be easier to configure and maintain than Windows-type binary registry database is. Systemd uses its own format, which uses Windows-style INI files to describe the same.
Init, however, is not "all", as many applications use scripts to launch themselves (with the correct user-specific and user-locale/environment setup, typically using environment variables and command-line parameters), and many services use externally executed scripts as a way to hook into their internal events.
On my bog-standard systemd-based Linux Mint 20.3, I have 2903 executable files in
/bin,
/sbin,
/usr/bin, and
/usr/sbin. Of these, 442 (15%) are shell scripts, totalling just under 11,000 lines of shell scripts. Note that this does not include anything related to init, just launch scripts, so the total number is much, much higher on a typical system. On an embedded system with a full OS but only required applications, the number is obviously much smaller, but then, the init system is best implemented as a dedicated set of scripts optimized to minimize startup time and resource usage when the system is fully running. 12kLOC of related Bash scripts isn't excessive at all for a Linux-based embedded system or appliance, in my experience in Linux systems integration.
For further information, and to get better at systems integration, I warmly recommend the
Linux from Scratch project, as well as looking into the init and at least the minimum OS support services in the various BSD variants and perhaps
OpenWRT, too. The latter is widely used in routers and switches, and most manufacturers use either a custom fork, or a similar internal builds. You'll be surprised how many scripts are used. Yet, because the scripts are only in memory during their execution, and are easily modified to adjust to different hardware and/or use scenarios, are perfect tool for their use case. An always-in-memory binary service would not only waste resources, but possibly also be slower and more fragile than independent scripts.
(Why, then, is systemd pushed so hard into Linux? The original SysV init was a good design for single-core machines without too many services. With multi-core processors, and many services and services having interdependencies, new init systems started popping up that could marshal the startups more effectively, often even in parallel, thus reducing the OS bootup startup times. For really robust service maintenance, first service supervisors for Linux appeared in late 1990s; the one I used extensively was DJB's
daemontools and a bit later, Gerritt Pape's
runit. The reason why systemd later 'won' over launchd and upstart and others, was not technical, but a business and social choice: it had the resources of Red Hat behind it. The key factor was the Debian discussion on Init systems, which caused an avalanche effect among Debian derivatives, especially Ubuntu, which had spent quite a lot of effort in developing upstart. This discussion and vote was not on technical merits, and was basically an example of how to use human resources to ensure you get the result you want; all of it is still available in Debian mailing list archives. I myself prefer technical superiority over social or business superiority, so I prefer other options. Make no mistake, systemd is nowhere near the peak of how init and service supervision can be done on current hardware; it is just the popular choice among humans.)
Would I personally want to switch from Bash to Lua? No, not really: I have so much experience in Bash that writing robust scripts in it comes naturally, by default, for me. Do I see the switch a bad idea? No, because I am interested in the technical effects of the switch. At minimum, it is an experiment I support, because I am interested in the differences to Bash/POSIX sh-based scripts. In general, I find such experiments the only real way to find a possibly better path forward; reality and practice always trumping theories.
Apologies for the wall of text. Systems integration (including scripts at the core of OS services and maintenance) is just a sensitive thing for me, because just like myself, it is often overlooked and completely ignored, while it is a key part of making an OS an useful tool; in Linux, the key difference between an unreliable and flaky OS and a robust, stable one (because typical kernel configurations tend to be absolutely rock solid). No offense or belittling intended; it is just my grumpiness due to how often systems integration gets overlooked and ignored.