Thunderbolt monitoring software

I have a question about coding. I am still learning C++, Well I am still absolute beginner level. My questions would it be possible to write a program that could record Thunderbolt pass thru? Say for example. I have my PC Graphics card plugged into my Macbook pro with thunderbolt. Then Plug my second thunderbolt into a monitor. Then have a program that monitors that pass thru and record it using something like OBS or similar? I figured this would be something Neck beard level as long as the hardware would allow it.