Where doesn't tie the whole sentence together; it's actually just part of a clause in the sentence: "where it supposedly had been deposited". Below is how I parse the whole sentence:
First off, the part before the first comma,
In what is one of Europe’s biggest accounting scandals in recent years,
is a separate clause modifying the rest of the sentence, so we can just look at the rest:
Wirecard acknowledged the money was phantom after two banks in the Philippines where it supposedly had been deposited denied having ever received it.
Grammatically there's actually more than one way to understand this, but I think one way makes more sense, so I'll try to explain that one.
When I read it and get to the part "had been deposited denied having", the word "denied" sticks out to me, because it doesn't fit with the verb phrase "had been deposited". So that tells me that "deposited" ends its clause. In fact we can (and I personally would) add commas to separate out that clause:
Wirecard acknowledged the money was phantom after two banks in the Philippines, where it supposedly had been deposited, denied having ever received it.
And then we can look at the grammar of the rest of the sentence without that clause. Another clause that can be separated out is the one with "after". It modifies "acknowledged", telling us when that happened:
two banks [ in the Philippines ] denied [ having ever received it ]
And once we take out the "after" clause, we're left with
Wirecard acknowledged [ the money was phantom ]