I recommend you use an environment mapped instrument. This will let you map input midi notes to output midi notes. Additionally you can insert an environment object like this both in front of or after the sequencer...so you could record the remapped notes or the original notes, whichever way you prefer.
Otherwise, yes you could certainly do it in Scripter, but that seems harder to me. (and I'm the ultimate Scripter nerd)
OSX 10.15 (Catalina) on OpenCore - Logic Pro 10.6.1, VePro7, Mainstage3
5,1 MacPro 3.46ghz x 12 128gb ram