Correct way to implement interrupts inside a class (Pi Pico W)

That method will only support a single instance of the MotorController class. You can do it for an arbitrary number of instances (up to the maximum number of interrupt pins), but it requires some template trickery. See Post #44 in this Thread.