The Racah algebra $R(n)$ of rank $(n-2)$ is obtained as the commutant of the mbox{$mathfrak{o}(2)^{oplus n}$} subalgebra of $mathfrak{o}(2n)$ in oscillator representations of the universal algebra of $mathfrak{o}(2n)$. This result is shown to be related in a Howe duality context to the definition of $R(n)$ as the algebra of Casimir operators arising in recouplings of $n$ copies of $mathfrak{su}(1,1)$. These observations provide a natural framework to carry out the derivation by dimensional reduction of the generic superintegrable model on the $(n-1)$ sphere which is invariant under $R(n)$.