Is it possible to move an app icon to a newly created folder or an already existing folder inside the launcher menu programatically?
Home Screen Launcher apps are just that: apps. They are written by device manufacturers and third-party developers. If the creator provided an API to programmatically add an app into a folder then sure, but otherwise no standard API exists in Android. You are free the build a launcher app without the folder metaphor or widgets or multiple screens.