A minimization approach to the wave equation on time-dependent domains