The likely real reason you got such a frosty reception from your manager is because your automation directly threatens his position by making redundant his headcount.
My default advice (because I've seen this more than just a few times) in situations like these is to wait 2-3 weeks, then go back to the manager and say, "Hey Boss, remember that automation I showed you the other week? Your experience proved you right; after our meeting I went back and tested some more because you were so cautious about the idea, and indeed found edge cases it didn't catch, and man it's a pain to work through them all so I tossed the code. Boy, am I glad you advised me to tread carefully there with all your years of hard-won experience!". Unless you can get at an actual-owner who would see the obvious direct benefits, slash the workforce, and protect you from the backlash, you are not going to progress anywhere by continuing to threaten your manager the way you are now. Getting demoted or even laid off is a real possibility for you with a reaction like that to automation. The management level to sell this to is the one that will benefit from decreased headcount while holding productivity at the same level (or some variation thereof).
In the meantime, keep your automation on the down-low, use it to free up your time, maybe share with a very close friend at work (if you know for absolutely certain they won't blab, as a reveal is exceedingly likely unless they are a fellow coder and see the logic in my advice above, and maybe not even then), then allocate the slack time to other activities that will boost your marketability on your own equipment (learn new stuff, write more code, etc.). When the time is right, find a better job and jet, and leave them never the wiser about the possibility of automation (unless you want to come back and sell your automation to an owner or high-level manager, for the estimated savings on 3-5 years of automated-away fully-burdened labor expenses, which will look good on their budget...just make sure you do a new/improved from-scratch rewrite with better error checking/etc. on your own time and sell that and not the code you wrote while they employed you).
My default advice (because I've seen this more than just a few times) in situations like these is to wait 2-3 weeks, then go back to the manager and say, "Hey Boss, remember that automation I showed you the other week? Your experience proved you right; after our meeting I went back and tested some more because you were so cautious about the idea, and indeed found edge cases it didn't catch, and man it's a pain to work through them all so I tossed the code. Boy, am I glad you advised me to tread carefully there with all your years of hard-won experience!". Unless you can get at an actual-owner who would see the obvious direct benefits, slash the workforce, and protect you from the backlash, you are not going to progress anywhere by continuing to threaten your manager the way you are now. Getting demoted or even laid off is a real possibility for you with a reaction like that to automation. The management level to sell this to is the one that will benefit from decreased headcount while holding productivity at the same level (or some variation thereof).
In the meantime, keep your automation on the down-low, use it to free up your time, maybe share with a very close friend at work (if you know for absolutely certain they won't blab, as a reveal is exceedingly likely unless they are a fellow coder and see the logic in my advice above, and maybe not even then), then allocate the slack time to other activities that will boost your marketability on your own equipment (learn new stuff, write more code, etc.). When the time is right, find a better job and jet, and leave them never the wiser about the possibility of automation (unless you want to come back and sell your automation to an owner or high-level manager, for the estimated savings on 3-5 years of automated-away fully-burdened labor expenses, which will look good on their budget...just make sure you do a new/improved from-scratch rewrite with better error checking/etc. on your own time and sell that and not the code you wrote while they employed you).