Here is what current greenhouse tech looks like: a human (called a grower) uses their intuition to adjust hundreds of settings that parameterise what the actuators should do in different circumstances. For example, 20 settings might parameterise a 'ventilation setpoint line', which determines what air temperature the vents should start opening at given a measurement of the solar radiation intensity from a weather station. All the different actuators (heating pipes, vents, screens, misting systems, irrigation systems) have their own set of heuristics that need to be adjusted by hand..then beneath that a low-level control layer (e.g., PI control) manipulating individual motors/valves.
It's crazy but the grower has to manually adjust the settings as the weather, energy prices and crop state changes. With better software/automation we can improve the control of the environment within the greenhouse and thereby increase yields [kg/m^2] and minimise energy costs.
If the farmers are producing more tomatoes per m^2 for the same input costs they can afford to sell them to consumers (via supermarkets) at lower prices and still make money. It won't solve all the problems but would be a step in the right direction.