I love the idea of scripting on a router, but please give us a real language to work with.
Or install openwrt.
If you're not using Windows, WinBox will run just fine under Wine on Mac/Linux. That's how I run it.
Why, oh why do vendors decide to come up with their own mutually incompatible set of shell commands. And it's always so ugly compared to modern bash
My point is more that the web interface isn't the best option. Take your pick of the others. :)
The result is that I use NixOS for my NAT gateway/firewall, and simply live without fancier network features (I only have two NICs in that machine).
For wifi I begrudgingly use an off-the-shelf wifi router combo in bridge mode.