Is there a program that keeps the laptop between 30% and 80% when I have permanently connected it to the power?
No. When full, it no longer loads. When the battery drops below 95%, it starts charging again. My battery has been as good as new for 10 years.
Between what 30-80%? Battery charge, performance? It is not apparent to me from what you write.