I am still kinda bitter about mac os replacing the default bash with zsh. I gained nothing from that unwanted update, but got compatibility pains suddenly.
Is something is more complicated than a one-liner, use a real programming language instead, with proper building blocks, tooling and documentation. Use something like Go to crosscompile if you don't want to depend on something on the host machine.
In my experience, even very trivial short shell scripts over time tend to grow into a pain, that could totally be avoided when using a real language instead.