Automatic high torque swinger from a motor or a spare CD drive
Well, you probably can. Simply create some very slow generator (based on 555) and connect some relay in parallel with the eject button of the CD drive.
But isn't usual CD drives too noisy for such application? And how long the drive mechanic will live with such big mechanical loads?
Instead of using CD Drive, some small motor with gearbox seems to be a better solution for me. The motor need to have 20..30..50rpm output speed. Some of these may fit, but there are thousands of them in the on-line shops.
The needed speed depends on what the baby prefer.
Just put a disk on the output shaft and tiе a rubber band at the disk periphery. The other end of the band tie to the baby swing. In this construction only ON/OFF and optionally motor speed control is needed. The swinging will be generated by the mechanic. Here is very raw drawing of what I mean:

Very small motor is needed, because the swing will be accelerated smooth in the time. Some adjustment of the motor speed might be needed in order to work in the resonance frequency of the swing. Count the swings per minute of the swing and search for the same rpm motor. Some variable voltage power source will make such adjustments easy.

Safety:
The maximal amplitude of the swing must be limited in some way. If because of some reason, the elastic band is winded on the shaft, something must stop the swing and cause the band to be broken or the motor stalled, but not the swing torn down. Make the extended tests without your baby in the swing, but some heavy enough object instead.