The sentence is grammatically fine, but has redundancy.
In this part, "the building of the staff members who worked there ", the first 'the' assumes specificity which is fine, but the second 'the' can be eliminated which will make the speech more in-flow. Coming to redundancy, staff members ARE the people who work there. It is implicit.
When this redundancy is eliminated the pronouns, 'who' and 'whom' don't oust.
I think it needs rewording.
"Stockpiles of weapons were found in the building of the staff members who worked there - one of whom was later caught attempting to smuggle some of the guns out in the boot of his car."
can be written as
Stockpiles of weapons were found in the staff members' building, one amongst whom was later caught attempting to smuggle some of the guns out in the boot of his car.
After rewording, the 'whom' assumes an object of the verb (smuggle), that is later used in the sentence and the word, 'amongst' instead of 'who' adds more to believing that 'amongst' is referring to Staff members and not to the stockpile of weapons.