For more than 45 years I have used Pentax gear. The lenses released in the digital era were constructed in the traditional way. Of course many lenses suffered from barrel , pincushion, or moustache distortion. But only in a slight way. Tom Niemann found a way to correct the distorions and developed a plugin for Photoshop (Elements) and called it PTLens. There is no firmware (software) in Pentax lenses.
Companies,such as Panasonic, delevelop lenses which make use of firmware to correct lens faults such as distortions. The distortions are far worse. If the barrel distortion at the wide end of a zoom would not be corrected the lens would be unusuable. But the firmware in the lenses also control focussing, CA and more things. Panasonic regularly offers firmware updates for lenses.
The advantage of software controlled lenses is that UWA can be combined with tele, such as your Sigma 20-200mm. Such as lens was not possible in the past.
But the firmware in the lenses does not correct distortions perfectly, especially at the wide end. Therefore I use Lensfun, which has distortion profiles and is used by many software developers, also commercial.