IANAL, but "would it be legal for me to delete..." is the completely wrong approach here. Instead...
- You were an hourly warehouse flunky, not any sort of professional programmer. While doing your warehouse job, you cobbled together a mish-mash of software stuff, on company computers, to try to make your job easier. With you there to fiddle and debug and update as needed, that worked pretty darn well.
- Now, you are leaving. Your layman's understanding is that the company legally owns all the software you made...as is. There ain't no "You Programming, Inc." in this situation, for your old employer to have any documentation, nor warranty, nor support contract from.
- Your suggestion is that the company delete the software, and revert to the previous procedures - which worked perfectly well. If it seemed worthwhile, a professional programming company - which could offer documentation, warranties, support, etc. - could probably duplicate the features of your stuff pretty quickly.
The goal being to convince the management of Warehouse, Inc. to order the deletion of your software from the company's computers.
Or, if you're more of the entrepreneurial mindset, convince management of the value of the software and offer that they can pay you to keep improving it.
This presupposes that such convincing is even possible. Many, many companies have leadership that are simply terrible at identifying value. If you've never been part of a majority of developers advocating for, if not outright begging for, some huge ROI initiative to get the green light, you are very fortunate.
There are great counterexamples, like Valve, which is known for giving developers an extreme degree of autonomy, and they benefit greatly from that approach. For each Valve, though, there are dozens of companies that manage to succeed despite themselves.
Take Microsoft, for example. One tiny, yet representative, example: the way the Windows Terminal team handled a suggestion from Casey Muratori to take their software from abysmally slow to lightning fast:
A quote from one of the Terminal developers, dismissing the suggestion:
> I believe what you’re doing is describing something that might be considered an entire doctoral research project in performant terminal emulation as “extremely simple” somewhat combatively…
Just how difficult was such an endeavor in actuality? Well, given that Casey implemented his own terminal emulator from scratch and incorporated the functionality he was proposing in a mere weekend... not a whole lot. Relatively minor effort for a huge return on investment. It took Casey explaining the concepts, then providing a working proof of concept, and finally a bunch of backlash online towards the Terminal team to get them to do the right thing for themselves and their users.
Or, if you're more of the entrepreneurial mindset, do one last update of the software to introduce a pay-as-you-go/SaaS model with your credit card in, and when you're leaving, you remove your credit card info.
IAAL but likely not in your jurisdiction, and I agree with this, because the biggest "legal" concern I would have as the linked OP is the company coming back and blaming me for some software I wrote that was out of my job scope entirely.
I would add that the goal isn't just to convince the company to delete the software, but rather to acknowledge and accept that there is no support, no warranty, and if things go wrong it's on their hands.
Added Point I: The value of product going in and out of even a modest-sized warehouse in a week can easily be 1000X the net worth of any of the hourly employees there. So if things went wrong - trying to recover their losses by suing Manuel McLong-Gone would be hopeless. And that might also alert their insurance carrier to an excuse for denying coverage.
Added Point II: Being responsible for all that money, no Warehouse Manager worth a pallet would want some undocumented & unsupported software, cobbled together by some former hourly employee, to be left running in his warehouse. Even as you depart, you are being loyal and industry-savvy, and making sure Mr. Manager knows about that potential problem. And how to prevent it.
- You were an hourly warehouse flunky, not any sort of professional programmer. While doing your warehouse job, you cobbled together a mish-mash of software stuff, on company computers, to try to make your job easier. With you there to fiddle and debug and update as needed, that worked pretty darn well.
- Now, you are leaving. Your layman's understanding is that the company legally owns all the software you made...as is. There ain't no "You Programming, Inc." in this situation, for your old employer to have any documentation, nor warranty, nor support contract from.
- Your suggestion is that the company delete the software, and revert to the previous procedures - which worked perfectly well. If it seemed worthwhile, a professional programming company - which could offer documentation, warranties, support, etc. - could probably duplicate the features of your stuff pretty quickly.
The goal being to convince the management of Warehouse, Inc. to order the deletion of your software from the company's computers.