I’m pretty sure the reason that it doesn’t count the enemy raids is because it’s un-monitored. The battle is controlled via algorithm + AI, and the only tracking done is for the party doing the attacking.
Frankly, I believe this is fair because you yourself aren’t participating in enemy raids.
I can understand how vexing it is, however. The raid algorithm is fiercely unfair. You’ll go on a winning streak, reach a certain trophy earning, then fall into a losing streak and drop as much as 400 before bouncing back again. The cap raises as your overall team power does. It’s a known ‘issue’, and I’m under the impression that E&P is working to improve the experience. For now, however, we have to continue to bite the bullet.