i never tried this contribution, but from what i see it is indeed confusing. it is like you assumed: when using a driver chip like the one mentioned, 2 pins should suffice. only when controlling the motor directly you need 4 pins.
i’d also have a look at this library (instead of the standard stepper lib): https://www.airspayce.com/mikem/arduino/AccelStepper/
it’s quite sophisticated with its accelleration behaviour and works in all possible configurations (directly (4 pins) or with driver (2pin)).