We consider a dark sector model containing stable fermions charged under an unbroken $U(1)$ gauge interaction, with a massless dark photon as force carrier, and interacting with ordinary matter via scalar messengers. We study its early Universe evolution by solving a set of coupled Boltzmann equations that track the number density of the different species, as well as entropy and energy exchanges between the dark and visible sectors. Phenomenologically viable realizations include: i) a heavy (order 1 TeV or more) lepton-like dark fermion playing the role of the dark matter candidate, with various production mechanisms active depending on the strength of the dark-visible sector portal; ii) light (few GeV to few tens of GeV) quark-like dark fermions, stable but with suppressed relic densities; iii) an extra radiation component in Universe due to dark photons, with temperature constrained by cosmic microwave background data, and in turn preventing dark fermions to be lighter than about 1 GeV. Extra constraints on our scenario stem from dark matter direct detection searches: the elastic scattering on nuclei is driven by dipole or charge radius interactions mediated by either Standard Model or dark photons, providing long-range effects which, however, are not always dominant, as usually assumed in this context. Projected sensitivities for next-generation detectors cover a significant portion of the viable parameter space and are competitive with respect to the model-dependent constraints derived from the magnetic dipole moments of leptons and cooling of stellar systems.