This has a lot of errors.
Neither ISD or Lunar is capable of past-light acceleration. 2,5c nor 25c is possible for either.
Imperium warships are capable of around 0,75c (which is very, very, very fast) and I don't think ISDs can put in anything near that (They never do in the films, even when they are chasing the Falcon).
Also, 25km is way too small a range for the Lunar. While i'm not sure on ISD range ( Suffers from authors' differences, can range from 80kms to thousands of kms) Imperium ships are capable of lightminute-range engagements, which is around millions kms at least.
Also, Proton torpedoes usually go through shields, as do mass drivers in SW universe. That means most likely imperial torpedoes and macrocannons would too. Remember, a ramming A-wing took out the Executor, ISDs have little kinetic protection up close. Another ISD gets killed off by an asteroid hitting it in EP 5. As cool as an ISD is, I can't see it surviving a volley of macrocannon fire, which uses shells much bigger and damaging than A-wings and they fly at much higher speeds.
"The Death Star's core is shielded, so we have to use Proton torpedoes" they say in EP 4. Which implies protons go through the rayshield.
Again, this is not fair. The ISD is equivalent to the Sword Frigate. Its like comparing Darth Vader to an Imperial Guardsmen or a Redshirt. Or Kirk to a Stormtrooper or a Gretchin.
Also, on a rainy day I did some calculations on how much damage a Nova cannon would do with a neutronium shell, using the average neutron star matter density as theorized by modern science, 0,9c and 50m long and wide shell and a lot of online relatististic calculators. The result was around ten times the higher-end calculations of the Death's Star's superlaser in yotta-joules.
Tie's are also notably fragile with a thin titanium hull. Nothing compared to ceramite or adamantium, or even durasteel which a Space marine can "rip like wet paper" .
"Tanks did not slow the Space Marines down. They clambered up on to them, ripped off durasteel hatches as if they were made of paper and dropped grenades into the interior." -Angel of Fire, by William Amazing King, Master of Space Wolves.
TIE Defenders and Assault Gunboats are a different thing, but still I doubt they got hard enough weaponry to make a difference. The only thing an ISD has that could pose a threat to a Lunar would be filling it to the brim with Missile Gunboats (Starwars equivalent of Space marines) , each having enough firepower to blow two ISD-s out on their own.
Even these would be hard pressed, since 40k Point defense are actually hundreds of Turbolasers( and assorted Flak cannons). If one absorbs the damage done by these in warzones (They are also on Titans and Thunderhawks), they tend to be around the same end as "regular" (Not heavy) turbolasers used in Star Wars.
Which means that a Lunar's point defense system would be an actual anti-ship system in SW similar to an ISD's lesser turbolaser armaments.
In fact I read about a fight where two escorts used these "hundreds of turbolasers" to pester each other's hull in addition to their main batteries. Think it was one of the HH novels.
The fact that both sci-fis have their ship weaponry go from kilotons to yottatons depending on the writer does not help the situation. The fact that Void shields are sometimes dimensional warp shields, sometimes something entirely unexplained, sometimes a mix of both also does not help. Nor does that torpedoes sometimes go through shields and sometimes not in both universes.
Though actually,if someone applies common sense, the low and high end weapons can be easily explained because the following things can be done:
Phasers are laser guided particle beams.
Blasters/sw lasers are energized gas or plasma, depending on source.
Plasma and melta weapons are fusion weapons that fire plasma-energized gas at 100 million Kelvins.
Imperium las weapons are "destructive energy channeled along a powerful laser" as Dow2 puts it. Which explains the non-laser like characteristics perfectly.
Macrocannons are railguns.
Photon torpedoes have variable yields.
All of these can have their firepower adjusted by what manner of energy is fed into the sytem, or in case of torpedoes and macros, what type of warhead you use, or how fast you fire them out of the barrel.
It stands to reason that ships would fire at each other with maximum firepower (as AT-AT does against shield generator on Hoth), but they would fire less powerful shots when supporting ground troops. You don't want to glass the Promethium mines, the Dilithium mines, or the Tibanna gas mines you are trying to capture OR the army you try to support by glassing half of the hemisphere, so of course you use less powerful shots to have a more precise and less devastating blasts.
This is done easy with energy weapons by adjusting the power they use, and Macrocannons can fire weaker shells at slower speeds when supporting ground operations.
A fairer fight would be a Sword vs an ISD. I still think the Sword would win in a sheer battle of firepower, with the ISD being more useful and multipurpose since it can also carry troops and fighters to use in patrols.
Of course, 40k is all about WAR, so its "being good" at warfare is no surprise. Starwars, despite its name, is a story-based space opera where good and evil characters fight. Star Trek is a more tech-nerdy and moralising story franchise, so neither is "full on warfare" and thus it takes a backseat to characters and story.
I have read almost all 40k material ever published, around half of the Star Wars Legends storyline, and saw all Star Trek Tv stuff (books are not canon there, only films and series).
A general rule for these is that:
Star trek has low powered ships but poweful superweapons.
Star wars has medium powered ships and medium powered superweapons.
40k has very powerful ships but very mediocre superweapons.
Mind, most 40k ships would be superweapons on their own in most scifi. Also, most superweapons are once-off and than never used/forgotten, like how one The Original Series had a mad Starfleet captain discover an explosive that a vial of could blow up a planet. Sure Palpatine and Abaddon would want that, and sure it would kick the Borg's ass, but it never shows up ever again.https://en.wikipedia.org/wiki/Whom_Gods ... _Series%29