How to explain the use of を in this sentence


This is a sentence on Duolingo. Ever since they took away the discussion
forum, I've had to look for help elsewhere.

彼女は自電車を盗んでいるところを捕まった。

"She was caught (when she was) about to steal a bicycle"

Now 捕まる is an intransitive verb, so theoretically, it should not take a direct
object. Even if it did, the direct object in this case would have been 彼女, not
"自電車を盗んでいるところ". Would someone be able to break this sentence down for me,
especially around the use of the second を in the sentence?

