What are the approaches to aggregate categorical variables?
You problem is essentially you have high cardinality in your features, right? This will be relative to your problem, but you can look for mean encodings. Essentially, you will replace categories by the mean on target variable, however, this is highly prone to overfitting and you should take care.

The following two videos will give an excellent explanation:

https://www.coursera.org/learn/competitive-data-science/lecture/b5Gxv/concept-of-mean-encoding
https://www.coursera.org/learn/competitive-data-science/lecture/LGYQ2/regularization

Another idea is to group similar sequences into one segment, for example, let's say we have:


A->B->C and B->C


If this makes sense in your application, this could be transformed into one variable only.