Presuming you want to find a function from real time to clock time $f:\left[0,1440\right]\rightarrow\mathbb{R}$ such that
- $f(0)=0$
- $f(1440)=1440$
- For all $t\in\left[0,1440-576\right]$ we have $f(t+576)-f(t)\neq576$
- $f$ is continuous
If $f$ is allowed to be discontinuous as in the problem statement, then
$$f(t)=\begin{cases}0&t<1440\\1440&t=1440\end{cases}$$
works. Hilariously, this is a dead clock, which is right once a day.
The first part of your solution idea is sound: make the clock run fast at times and slow at other times. The difficult part is to force the average to be nowhere correct.
Suppose we construct $f$ such that $f(576)-f(0)=f(576)\neq576$. Then one way to ensure sliding the window forwards cannot result in a time difference of exactly $576$ is to not allow the difference to change at all.
So, suppose we next construct $f(t+576)=f(t)+f(576)$ for some range of $t$. Nothing stops us from literally requiring $f(t+576)=f(t)+f(576)$ for all $0\leq t\leq1440-576$.
The last part is to fit to the requirement that $f(1440)=1440$. We do this by splitting the clock gain within the 576 minutes into two periods of movement: one from $0$ to $\epsilon$, and the other from $1440\mod576-\epsilon$ to $1440\mod576=288$.
This particular solution is as follows:
- The clock runs extremely fast from $0$ to $\epsilon$, clocking 4 hours
- The clock stays dead from $\epsilon$ until $288-\epsilon$
- The clock runs extremely fast from $288-\epsilon$ to $288$, clocking 4 more hours (now 8)
- The clock stays dead from $288$ to $576$
- This cycle repeats per $576$ minutes
- Note the third (partial) cycle ends with clock running extremely fast from $576\times2+288-\epsilon=1440-\epsilon$ to $1440$, clocking 4 more hours (now $6\times4=24$ hours as desired).
By construction, $f(t+576)-f(t)=f(576)=480\neq576$ for all $t$.