Company A’s legal dept. is probably going to tell you that any work you did for them is theirs and not to try to reproduce it. This is not exactly true. Talking to them will probably just open a can of worms. If there are any company A patents involved, then just back away slowly, so let’s assume that there are no patents. As the engineer who implemented the code, your name would probably be on any related patents, so you would be aware if this is the case.
If you recreate the underlying logic from the ground up, you shouldn’t be crossing any line. Just don’t take company A’s code and refactor it and call it new. They have the copyright to the actual code, and there are tools that analyze a codebase looking for infringement. This is where you get into danger. When creating the new UI, I wouldn’t try to make it look too similar either. Company A could also argue that you’re infringing on their property if you release a tool that looks identical to theirs. It is very unlikely that you would actually get in trouble for this, but if you did end up in court, you don’t want a jury looking at two interfaces that look identical.
Let’s be realistic. Unless you wrote something that has the potential to be a “million dollar app”, you’re never going to hear anything from company A. Even talking to their lawyers about it is throwing money down a hole for them. There are very few things a tech artist might write that fall under that category.