Why not just install a newer version of bash? It’s trivial to do so with homebrew. I’m sure your team has other dependencies that must be installed in order to run your software.
And now I'm needing to sniff your OS, detect whether or not Homebrew is installed, install it if not, then install Bash >3, then run the actual meat of the script.
All because of Apple's lawyers being scared of GPLv3.
At this point, I may as well insist that you install pyenv and Poetry and deliver it as a Python package.
You already have to deal with platform-specific differences even (nay - especially!) across Linux with things like apt vs yum vs dnf vs pacman vs Nix. One more is really a non-issue.
OpenBSD uses pdksh, Busybox/NetBSD/Minix use ash, there are some linux distros that use zsh, OpenSolaris is ksh, etc.