What is $\underbrace{2018^{2018^{2018^{\mathstrut^{.^{.^{.^{2018}}}}}}}}_{p\,\text{times}}\pmod p$ where $p$ is an odd prime?

Unfortunately, your claim is not true. I'll prove that$$^{31} 2018 \equiv 28\pmod {31}$$ . Firstly, note that for all $n \geq 2$, $^n 2018$ is multiple of $4$. By Fermat's Little Theorem, we get $^{(n+1)}2018=2018^{^n 2018}\equiv2018^2\equiv1\pmod 3$ and $^{(n+1)}2018\equiv2018^4\equiv1\pmod 5$. It also holds for $n=29$, so $^{30} 2018 \equiv 0 \pmod2$, $^{30} 2018 \equiv 1 \pmod3$ and $^{30} 2018 \equiv 1 \pmod5$. By the Chinese Remainder Theorem, $^{30} 2018 \equiv 16 \pmod{30}$.

Now, $^{31} 2018 = 2018^{^{30} 2018} \equiv 2018^{16} \equiv 28\pmod {31}$.