One-dimensional photonic wire (nanobeam) microcavities are becoming preferred tools for the investigation of enhanced light-matter interaction. Here, the Q-factor of a locally infiltrated slot microcavity in a nanobeam is theoretically investigated. The electric field of the cavity mode is concentrated in the slot region leading to a large overlap with the infiltrated material. Tapering the spacing and diameter of the pores of the adjacent Bragg mirrors a maximum Q-factor of 35,000 is predicted. General design rules for the minimization of scattering losses and the enhancement of quality factors are reviewed and discussed.