I would say it is useful on virtually all Rogues (not sure if they meet your martial definition) and can be situationally pretty useful on martials with extra attack.
I definitely view Rogues as martials. I think that True strike is of use on
some rogues.
It has opportunity cost to obtain, since it requires specific races or origin feats.
It locks you out of dual-wielding as a way to get more chances to apply Sneak Attack: True strike rogues generally rely on having advantage, so they have to turn themselves into a turret with Steady Aim, or have a lot of cover available to duck behind.
I'm sure that it is a good way to get DPR on paper, but I've yet to run into many who actually play their rogues like that.
It is also typically the best ranged attack on a dex-based melee character who dumps strength and uses a shield (which is itself situational) as it is usually better than throwing 2 daggers. I've also seen it on strength-based sword and board characters to use with a pistol as an available basic ranged option (assuming the DM allows you to carry a loaded pistol).
A "dex-based melee character who dumps strength and uses a shield" is a really niche character. Generally most Dex-based melee characters don't use a shield, they dual-wield because it allows them to swap to ranged weapons rapidly. I don't think that I've seen many of those characters at all. Likewise Str-based characters tend to use Extra Attack.
Now having options is always better than not having options. But as mentioned, there is an opportunity cost to having the cantrip, and the option to deal lesser damage but of the radiant type may not be worth it.
Particularly (bringing this back closer to the original topic) because you're losing GWM bonuses and similar by using True Strike with the Longbow.
Here is your exact words in context. I may not understand what you meant, but you said wield weapons:
"When martials can cast using their primary or secondary ability scores in the same way that many casters can wield weapons using their primary or secondary ability scores",
I did indeed say "wield weapons", and I meant exactly that.
Ammunition though gets used up very fast if you are firing 2 arrows (and using up 1) every single round. I mean 100 arrows is 100 rounds of combat with extra attack. That is all you will get out of them. That is enough in some campaigns where you have the opportunity to restock, but it is far short in others.
I've not been in many situations where that became relevant, but you evidently consider it a factor. Do you think that having to use a limited stock of ammunition for your ranged attack is quite a disadvantage compared to having a ranged attack where ammunition isn't a factor then?