I was about to comment that I once found a solution for that, but it is in the thread you link to.
The built-in smooth method just takes the mean value of a load of samples, and when they are hovering around 0° in an 0-360 range, you get that 180° flip problem.
In essence: instead of using the built-in smooth() method, we rolled our own, that takes into account that the average of 1° and 359° should be 0° and not 180°.
Kalleheiki wrote one that shifts the problem 180°, and I offered a solution that should work for all angles.
But again: it’s a totally separate expression, not using smooth() at all but getting the exact same result.