If you have persistent eyelid myokymia, is it okay to get botox or even have surgery?

Possibly. An accurate diagnosis before treatment is essential for success. See an ophthalmologist (preferrably a neurophthalmologist), as well as a neurologist if there are any associated symptoms. Botox may be very appropriate in some cases but as with all treatments there are potential risks (droopy eyelid, slow blink, etc).
Yes and no. What you describe is defined as eyelid twitching. If it is more extensive it can be blepharospasm and then the answer is or might be yes. These signs/symptoms can be from medications, stress, localized untreated eye disease or be a manifestation of facial problems like sinus or even bad teeth. See an ophthalmologist first.
Botox! Botox is a heaven sent for many patients. Surgery has not been shown to be effective when compared to botox.

Related Questions

Supposing you have persistent eyelid myokymia, can you get botox or even surgery?

Botox. Sometimes myokymia is so persistent that it is constantly annoying. A good first step is to have Botox injected which can quiet it down and sometimes break the cycle. Surgery would be a last resort as it would disturb the lid function.