Summarising the ideas in my comments.
We can get some trivial upper bounds by bounding $\phi(d) \leq d - 1$ trivially (as attained by primes):
$$
\sum_{d \mid n} \phi(d) \frac{n}{d} \leq n \sum_{d \mid n} \frac{d - 1}{d}.
$$
At this point we can even more trivially bound the sum over $d \mid n$ by the sum $d = 1, 2, \dots, n$ and get
$$
\sum_{d \mid n} \phi(d) \frac{n}{d} \leq n^2 - n \sum_{d = 1}^n \frac{1}{d}
$$
so we get an upper bound of $a_n \leq n^2$ essentially for free. (The bound $\frac{d - 1}{d} \leq 1$ gives this $n^2$ without a secondary term too, of course.)
We can do slightly better by using $\frac{d - 1}{d} \leq 1$ and instead counting divisors of $n$, meaning that any bound on $\sigma_0(n) = \sum\limits_{d \mid n} 1$ gives us a bound on our sum for free.
E.g., the simplest version $\sigma_0(n) \leq 2 \sqrt{n}$ (since divisors come in pairs) gives $a_n \leq 2 n^{3/2}$.
Any bound on $\sigma_0(n)$ of course works, so using any bound like e.g. this one will give a substantial saving.
Therefore, to have any hope of doing better than something of the quality $n^{1 + \varepsilon}$ (or $n$ times some power of $\log$) we'd need to further analyse $\sum\limits_{d \mid n} \phi(d) / d$. This won't save us very much though, since (as analysed in this answer) for $n = \prod\limits_i p_i^{k_i}$ we have
$$
\sum_{d \mid n} \frac{\phi(d)}{d} = \prod_i \Bigl( 1 + k_i \frac{p_i - 1}{p_i} \Bigr).
$$
To get a sense of how little this could possibly saves us, recall how
$$
\sigma_0(n) = \sum_{d \mid n} 1 = \prod_i (1 + k_i).
$$
Hence using the bound $\phi(d) / d \leq \frac{d - 1}{d} \leq 1$ is not all that bad, which heuristically is borne out by the sense in which $\phi(n)$ is "always 'nearly $n$'."