We explore electron pre-acceleration at high Mach-number nonrelativistic perpendicular shocks at, e.g., young supernova remnants, which are a prerequisite of further acceleration to very high energies via diffusive shock acceleration. Using fully kinetic particle-in-cell simulations of shocks and electron dynamics in them, we investigate the influence of shock-surfing acceleration at the shock foot on the nonthermal population of electrons downstream of the shock. The shock-surfing acceleration is followed by further energization at the shock ramp where the Weibel instability spawns a type of second-order Fermi acceleration. The combination of these two processes leads to the formation of a nonthermal electron population, but the importance of shock-surfing acceleration becomes smaller for larger ion-to-electron mass ratio in the simulation. We discuss the resulting electron spectra and the relevance of our results to the physics of systems with real ion-to-electron mass ratio and fully three-dimensional behavior.