That's not so much an immigration question but be careful about incorporating and creating products while currently employed because your current employer might have a claim over your IP. If the question is when can I/should I incorporate without crossing any immigration line and when should I get a work authorization through this company, then the act of incorporating isn't the issue, the question is whether your activities and the business's activities require work authorization and there are both legal and non-legal lines that shouldn't be crossed. The primary non-legal guideline is when a a gut level, the activities are no longer a sideline but a business, a focus of what you do. The primary legal guideline is when the company is starting to generate revenue. In both instances, you should look to move to a work authorization status.
(Not a lawyer) I remember being told a rule of thumb that you should be a separate legal entity before "first contact" with a customer because that's generally where most of the risk of legal liability starts ramping up.
That's one approach and a defensible one but I think that might hamstring efforts to build a company to the point where sponsorship is an option. Another approach is providing services or products for a fee. But this is really a grey area and risks must be managed against the ability to be an entrepreneur and create valuable business and technology.
I’m working on a niche tool and have some interesting and I’m just starting to bring on the first users.
At what point should I incorporate?