The energy gain that has been achieved experimentally in dielectric laser accelerators has been limited to below 1 MeV to date. Limitations arise from the available laser pulse energy and from keeping the particles aligned in the microscopic accelerating channels. A significant progress in the focusing of the particles, and thus in the containment in the accelerating channel, has recently been achieved by the alternating phase focusing (APF) scheme. Here, drift sections between structure cells lead to jumps in the synchronous phase, which can be designed to provide a net focusing of the beam. In the present work, we model the energy reach of dielectric laser accelerators to relativistic energies, investigating the effect of structure design on beam dynamics and particle loss during acceleration.