As you said, ignoring passives and class modifiers, two buster cards with the same attack hit for the same amount.
Hitcounts come in with star drops and NP gain.
Stargen is calculated per hit, so you have a, say, 30% chance per hit to drop a star. In that case, Scathach will make a lot more stars than Raikou.
NP gain is also per hit, so if you have a 0.5% NP gain per hit from starting with an arts card, Scathach will generate 3% NP and Raikou will generate 0.5%.
This is why higher hitcounts are better, especially on quick and arts cards, though buster cards can also make stars, i.e. Raikou’s NP. Overkill hits also have an additional bonus to generation stats.
Note that these numbers are made up and don’t reflect the actual game, please look up the actual generation numbers.
TouhouSniper98 on youtube recently put out a video explaining these hidden mechanics better than I can here. Though watch out as several people on the forum don’t like him for a bit of a foul mouth.
Now, the way you asked the question makes me think that you’re not fully aware of class modifiers.
First off, normal class advantage is 2x. Bersekers do 1.5x to everything instead.
An additional multiplier to that is that Berserkers have a hidden 1.1x modifier. So they actually do 1.65x damage to everything.
Lancers have a 1.05x, Archers have 0.95x, Assassins and Casters have an 0.9x modifier, Avengers and Rulers also do 1.1x, and everything else is neutral.
Then you also multiply by the passives. Raikou has 12% buster eff from Mad Enhancement, that’s actually a 1.848x multiplier on her buster cards, though this one is additive with other buffs. That means that where Scathach does 2000 on an archer target, Raikou does 1848 damage. This is usually below average, but remember that Assassins and Casters would do 1800 damage to an advantage target.
Again, please look into the hidden mechanics, it will definitely answer your question better.