You can automate scanning without third-party tools using WIA COM object.
You can write a custom scanner app using: scan utility windows 11
: