Define $a_i^{j}$ as the number in the $i^{\text{th}}$ tile from left to right after $j$ operations.
Claim: $\sum_{i=1}^{2019}ia_i^j$ is always constant, no matter what the value of $j$ is.
Proof. Let the three consecutive piles that will change be $k^{\text{th}},k+1^{\text{th}},k+2^{\text{th}}$ tiles with $k\leq 2017$.
If operation $\text{(i)}$ is performed after $j$ operation then the difference are $\sum_{i=1}^{2019}ia^{j+1}_i -\sum_{i=1}^{2019}ia^{j}_i $
$$=\left[(k)(a^j_{k}-1)+(k+1)(a^j_{k+1}+2)+(k+2)(a^j_{k+2}-1)\right] -\left[(k)a^j_{k}+(k+1)a^j_{k+1}+(k+2)a^j_{k+2}\right]$$which is $-(k)+2(k+1)-(k+2)=0$.
Similarly, if operation $\text{(ii)}$ is performed after $j$ operation then $\sum_{i=1}^{2019}ia^{j+1}_i=\sum_{i=1}^{2019}ia^{j}_i$.
Thus if the the board have $1,2,\dots,2019$ again after $j$ operations then $$\sum_{i=1}^{2019}ia^{j}_i=\sum_{i=1}^{2019}ia^{j-1}_i=\cdots=\sum_{i=1}^{2019}ia^{1}_i=\sum_{i=1}^{2019} i\cdot i=\sum_{i=1}^{2019} i^2.$$By rearrangement inequality and the fact that $\{a_1,a_2,\dots,a_{2019}\}=\{1,2,\dots,2019\}$, $a_i^{j}=i$ for every $i$.