The short answer is no, you can't obtain an educational visa for the purposes of taking a Danish educational course even if it's online.
You can get an education visa (there're a number of requirements needed) and these do require you to physically attend an endorsed educational facility, the normal courses undertaken are obviously learning Thai language although you can also enrol with a Thai university for an undergraduate degree course for example.
Educational visas also require you to extend them every 90 days.
You can own 49% of a company, however you do not really want the other 51% to be owned by one individual. That 51% should really be spread across 2 or 3 individuals to protect your interests.
This article discusses Thailand Foreign Business Act and should be a good starting point for your considerations.
Samui is a nice place to visit, but when living there it's very small, you drive around it in a couple of hours. A good chuck on the island is for tourists and not really suitable (imo) for living.
Samui is too small, you'll outgrow it very quickly. You'll be reliant on either flights or a ferry to travel elsewhere in Thailand, another added expense especially for a family of 3. A location on the mainland would give you more options, and you can still visit Samui if you still desire. Samui is obviously much more expensive than other potential locations.