You can also do the same thing just with homebrew. I regularly replace a number of CLI utils because the BSD alternatives often have silly defaults/incompatible changes
Yeah, the script is just calling brew install over a list anyway.
I also outright replace sed and awk with their GNU equivalents. Better options and behavior, IMO. The only downside is if you have to share a script with someone, and then have to figure out how to make it work with stock.
No gsed, just sed.