Can you just tilt the camera sensor to get a transformed image? I remember reading that box cameras allowed you to tilt the film image plane to match a skewed object plane in closeups.
You could also just use the corners to compute the homograph transform.
Really depends on the constraints too. If you're going for archival quality scans then maybe it would be better to do it with hardware. At that point I'd just get a way higher res camera than needed, transform and down sample as needed. Would still probably be cheaper than a gimbal.