Possible to add Stochastic trend and seasonality in mixed model? (Prediction in Joint Models)

Good morning everyone, I have to fit a model to predict withdrawal of students attending an online university course. By “predict withdrawal” I mean that each week of the course I have to guess which students are yet likely to withdraw, and when they are expected to.
The main predictor that I have is the daily count of clicks for each student, for any e-learning web material, which means that, during day one, student A had clicked 5 times, day two he clicked 7 times, … student B clicked 10 times during day 1, 13 during day 2, … and so on.
I was thinking I could follow a survival approach. Even though my primary purpose is prediction, I should take into account that my predictor is time-dependent and endogenous; in fact, as the student withdraws, he also stops clicking. This means I should use Joint Models, described by Rizopoulos, rather than more standard survival approaches.
The count of clicks is recorded along up to 240 times, daily, for each student, so my predictor is a time serie with daily frequency for each student. This is a difference between my situation and the typical context of application for joint models, where the endogenous biomarker is usually sampled over much less observations, at potentially irregular time intervals. Because of this, the time serie of the average clicks made daily shows stochastic trend and weekly seasonality (there are less clicks on weekend days, on average).
I thought of including these known average tendencies in my model by adding two Unobserved Components (as fixed-effects covariates) to my model, local linear trend and weekly dummy seasonality, estimated as 1-step ahead predictions by a Kalman Filter. I also thought of including an autoregressive term of lag 1 (i.e., the outcome, one period delayed) after checking the empirical autocorrelation function of the residuals of the mixed effects model.
In all examples of joint models that I have seen, the longitudinal outcome is modelled as a function of time, or transformation of it (e.g., splines), and possibly other baseline covariates, but I haven’t seen any in which the outcome is estimated as a function of its own past values. Of course, the past of the outcome is an endogenous covariate itself, while time t = 1, 2, … is not (am I right?), and known beforehand.

My question is: would there be any data leakage or distortion due to the fact that I would use, as predictors, endogenous variables that are not known beforehand, and that are related to the outcome?