I don't see how ML change the scenario, instead of querying some db, you are now querying some trained models. Until we have an algorithm that could write correct code given requirement specified in natural language, the demand or prospect of software engineer as a profession will not be affected by ML/AI too much. However it is hard to predict when such technique will emerge, 10 years? 20 years? maybe 50 years.