This is a combination of software engineering along with mechanical engineering to make robots or any automation.
My background is in the software but took many courses where mechanical engineering was applied including drafting. Nowadays it is done via software.
I recommend dual major mechanical + computer engineering.
You will never have to worry about putting food on the table.