But as a software dev of course this is something you might have to do every once in a while.
In about twelve years of a variety of software development on Mac, from embedded to iOS/Mac apps to web, it has never even once occurred to me to do that. Considering that the OS will fill the disk with swap if need be, I'm trying to think of a reason to even want to do this.
Swap files are created by the OS when the existing ones are full. They are removed by the OS when they are empty. There is no way to set the swap size, because it is dynamic. What is the point of setting the size yourself, besides running artificially out of swap when you need more or taking unnecessary space when you need less?
I would 100% agree with you with regards to most macOS users. But as a software dev of course this is something you might have to do every once in a while.
The fact that you can't doesn't seem to align with the fact that macOS is the operating system of choice for software devs.