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…
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 wron…
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.