I fully support you in this matter. If such companies are allowed and not prohibited in Thailand, it means that someone needs it and someone makes a profit from it.
It is completely legal, if you yourself will not be involved in the business in which you invested. You will receive only your percentage of the profit, and you can live on any visa. Isn't that right?
Everything is possible. In Thailand, there is such a form of doing business as partnership, both with and without legal registration. It is not possible to work officially under this form.
The ask:thailand community, consisting of multiple Q/A groups with over 100,000 members, powers this platform. It is not an official government resource. Our members actively contribute to this resource, and while we strive for accuracy, we cannot guarantee its complete reliability. Assistance to travelers is provided as a community service.