The switching dynamics of a double-barrier Josephson junction is analyzed as a function of the microscopic properties of its electrodes. In particular, it is found that the nonstationary behavior of the Josephson phase difference is very sensitive to dissipation mechanisms acting inside the intrinsic shunt. The leading factor that determines the dissipation is the local electron density of states N(E) inside the electrodes. The roles of junction geometry, electrode purity, and interface quality are discussed and how they affect the details of N(E), hence the resulting phase dynamics. The microscopic analyses allow optimization of the performance of double-barrier Josephson junction-based rapid-single-flux-quantum circuits in two ways: 1) decreasing the switching time of Josephson elements and 2) reducing the excess wiring. Such an analysis is facilitated with the aid of a lumped circuit representation which generalizes the nonlinear resistive-shunted-junction model.