As regards Trek dialogue, "The Outrageous Okona" has Picard comment that "Lasers can't even penetrate our navigational shields". That's categorical on lasers, even if specific on shields. Picard doesn't have any specific data on which sort of lasers the Capulet ship is sporting; he doesn't ask; and he doesn't look at any screens or displays. (OTOH, he has just heard that the ship is of "Class Seven", which might in theory tell him something.) The fact stands that all the small ships in that episode carry laser armament, so it is viable within a certain region of applicability. Just like swords remain viable today.
Pike has lasers. Doesn't mean those wouldn't be antiques: they could be the "bayonets" of the day, as they apparently are part of a three-barreled weapon that's supposed to do different things depending on which barrel is chosen. Pike's lasers never defy any shields. Perhaps shielding categorically blocks laser action with such ease that ramping up power is futile - at least in comparison with switching over to phasers, disruptors, slugthrowers or plasmaweirders and ramping up the power on those.
The Solari in "Loud as a Whisper" have lasers. We don't know if those are the same rayguns we later see in action, with phaserlike properties. They are not employed against shielded targets, but OTOH our heroes attempt no shielding. (Sure, putting on a suit of armor would stop attacks by restless natives brandishing swords, but would that be a good way to dress up a negotiator? Rather have him in his usual fancy nightgown but flanked by people nonchalantly carrying submachine guns.)
Beyond these three references, lasers make little impact on Star Trek. We can argue that something drastically better came along and outdated the entire technology (there are guns now, so bows and arrows are a thing of the past - at least against vehicles, which is the closest analogy to the issue here); or that modern Trek death rays are simply better lasers, but go by a different name, and the older name applies exclusively to the inferior older type (we have rifles now and had them in the 17th century, but a modern rifle is not a musket and a musket is not a modern rifle). Either way, I don't see any implications on whether photon torpedoes ought to work or not.
Timo Saloniemi