Automatic flap control systems do exist. Boeing uses a system called Trailing edge load relief system, that automatically retracts flaps in case of excess airspeed. From ATSB Report 200202710:
Flap load relief system
The flaps/slat electronics unit provided a trailing edge flaps load relief function that protected the flaps from excessive air loads. That function was operative at the FLAP 30 and FLAP 40 positions only. The flap lever did not move, but the flap position indicator displayed flap retraction and re-extension.
When the flaps were set at FLAP 30, the trailing edge flaps:
• retracted to FLAP 25 if the airspeed exceeded 176 kts
• re-extended when the airspeed was reduced below 171 kts
When the flaps were set to FLAP 40, the trailing edge flaps:
• retracted to 30 if the airspeed exceeded 163 kts
• re-extended when the airspeed was reduced below 158 kts
Boeing 787 and Airbus A350 have systems that automatically adjust wing camber in flight using flaps to reduce drag. The Boeing system is called trailing edge variable camber (TEVC).
Of course the flaps are controlled by the computer in a number of combat aircraft.
Actually automatic flaps are not new. The Breguet XIV had them in the lower wing. Basically, the flaps (called 'Equalizer flaps') were hinged to the rear spar and were maintained at a given angle using rubber cords, which permitted them to vary with wind pressure.