I assume (and new to Arduino at this level) It would be a case of creating a library of the DCC commands
Probably, but without seeing the specification for the various IR signals I won't be more specific.
If you already have an IR transmitter it should be possible to write an Arduino program to capture those signals.
You should be aware that "library" has a specific meaning in the Arduino world and I think you just mean a list of commands
then writing a script to deliver these in a timed sequence
If the plan is for the Arduino to automatically issue a sequence of commands - such as Forward, Right, Forward, Left etc - then I suspect you may find that the whole thing gets out of sync unless there is some means for the Arduino to know where the car has got to - and I suspect there is no easy way to do that. Experiments will be needed to see if the system can be sufficiently reliable