Does the Donar Gun's Lightning Affinity apply to any Thunder magic damage you deal?
Thinking about Hachimonji shenanigans on Ninja with Tachi: Goten in particular.
Yes it does, but I think it's more for Raiton. I used to have it in my burst set because I was switching weapons (Gokotai/Tauret) anyways for max MAB nuke, so the TP loss with inconsequential.
I can't imagine how you would make it work for Tachi: Goten (I'm sure there's a way if you really wanted to, but there are problems). Would have to (1) be a scenario where you're exclusively using Tachi: Goten for Thunder Hybrid damage. I struggle to think of mobs that take increased thunder damage or have a low resistance to it in the first place.
Anyways, (2) Hachimonji's TP gain is terrible due to the unique STP->Multi Attacks feature that gives you a fixed TP rate. You might be better off using the Kaja Katana in such a case to get around the reduced TP gain.
You also,
as Nariont mentioned, (3) lose access to Daken, which is a great boost to your TP gain. How much stronger is Donar Gun making Goten in where it would be better than using R15 Seething Bomblet for WS and Seki Shuriken for TP? Could sim it, but I don't believe it would be by much or at all once you factor in TP speed.
That aside, (4) you would otherwise be able to use Hoxne Ampulla, which boosts Hybrid damage by a ton (for a cost of gil). I can't imagine Thunder damage would be anywhere close to DA proc on hybrid WS. Hoxne Ampulla "fixes" Hachimonji also, so it double duties a better sub/range slot for Hybrid WS. It is simply a better item for that gear slot, if you are willing to pay for it.
Lastly (5), I there are no MAB bullets that NIN can use, so you can't even boost the magical damage part of the equation in hybrid WS.
tldr - don't think it's worth it as a NIN TP piece alongside Hachimonji w/ Tachi Goten, unless there was some weird config SC where you wanted to throw in a Marksmanship WS into the mix. For funs/shenanigans, go for it. It is a very good Raiton nuke swap, especially when MBing Futae for one huge chunk and need to push damage as much as possible (Ghastly Tathlum +1 is also very good, maybe better than Donar anyways? can test it easily since Ninjutsu damage is predictably easy to test gear for).