Can Cubase send a message on track selection via midi?

I want my huge Cubase template with lots of midi tracks connected to VEPro to send some midi messages over an alternative channel to another program on the same computer. So far, I found this:
1.) Generic remote: it is possible to send a midi message by using Midi mixer - selection - track select. However, this only sending the same midi message, whatever the track might be. I would have to use a dedicated entry in the generic controller for every single track in my template (which will grow over a thousand, I believe (with most other tracks being disabled and deactivated, but ready for usage with a few clicks). Also, I would change the controller output by just switching order of some of the tracks, which opens opportunities for all kinds of faults, so there seems to be no good solution to me within the GR alone …
2.) Including midi send effects: next, I found that I can send a simple message via generic remote to my external program and send that back to the midi in of Cubase. There, I have a midi send with a transformer, which transfomrmsmthis midi message to a unique midi note, set up individually for each track. For example, when I select Midi track one, it sends “note on, pitch 0, velocity 0”, for track two, it sends “note on, pitch 0, velocity 1” … and so on. This gives the external program the opportunity to identify that selected track and 16385 different tracks could be used and individually identified (I won’t go into details here on, why I want to do that, but I think you can imagin).
The only problem however, with a large number of midi tracks, I get Asio spikes! So it seems necessary to deactivate most of the midi tracks not used within a project. Unfortunately, the assignment of midi sends does not get recalled when reactivating a track. So, it will really be bad for the workflow to have to look up those numbers every time …
3) I thought of device panels that could send individual messages (e.g. Sysex), but I cannot connect those tracks to a VST instrument within Cubase and that would be necessary to use VEPro - another dead end, as it seems.
Does anyone know how this could be achived without all of those problems? Thanks!