Self learning controllers are a dangerous topic. This is mostly because a large bit of the data you collect is noise. Separating noise from the actual important signal is never feasible. This means that if you would alter your PID parameters automatically based on data, you will most likely reduce performance and in the worst case even lose stability.
However, that does not mean this data is useless. Aside from determining when the controller must be redesigned or components need replacement, you can use the data to tune feedforward parameters. Feedforward allows you to improve tracking performance by reducing classical non-linear attributes from a system. Think of static friction, coulomb friction etc. Tuning feedforward can be done by hand, and thanks to its internal structure, stability and bandwidth are still regulated by the PID, therefore you cannot lose stability (that does not mean you cannot break the system, be careful).
If you are to lazy to tune feedforward parameters by hand, you can use your data to automatically learn the optimal feedforward parameters. This can be done using something known as Iterative Learning Control (ILC). ILC is known to optimize Feedforward such that it can perfectly track one reference sequence. This is useful if the controller has to track the same reference all the time. However, when it must track something else, tracking performance drops significantly. This behaviour is much less present when the Feedforward parameters are tuned by hand.