There are many neer duplicates of this question but I recommend deleting ones that are not version specific (ie 18.04) as we cannot know if a solution will be viable on future versions.
This is the case here, unfortunately.
The requirements to answer this question:
(1) works on 18.04 & runs as a plasmoid in the panel
Or
(2) works in 18:04 & runs in the panel as notification or other
to scale CPU frequency.