Warning: I've got a bit of a chip on my shoulder, Goni's are one if not my favorite genus and one I studied academically (in undergrad) for a short time.
IMO there is a lot of really poor advice and anecdotes in this thread.

"The absence of evidence is not the evidence of absence" just because someone has had a goni for 5 months and their clowns haven't killed it yet is not a strong case for long term success with this species.
Goniopora stokesi did not earn
its reputation for nothing. If you look for threads here or elsewhere from even just a few years ago you'll see verbiage along the lines of "
the expert that can successfully keep goniopora for 12+ months stands as a testament to the keepers skill" Now we have come a long way in the last few years with this species which I think gives less experienced reefers the wrong impression. Goniopora
are difficult to keep long term but for different reasons than many other difficult corals. If you look at any of the academic/scientific literature you'll see reports of goniopora successfully growing in
conditions that would kill it almost overnight in a reef tank. These are not SPS that will RTN the first time your ALK drops too low, or when temps rise a little too quickly. They are incredibly hardy in the wild, but in general do poorly in captivity, and we're beginning to understand why. They seem to be more susceptible/predisposed to pathogens possibly due to lipid peroxidation, protein degradation and DNA damage.
Goniopora have had a history of being susceptible to brown jelly disease and a whole host of other pathogens and they seem to decline in one of two ways in home aquaria:
1. physical damage that leads to secondary bacterial/protozoan infection (quick demise)
2. longer term decline in health due to poor nutrition, some missing "x-factor" that we have not determined (it may in part due to a lack of antioxidant enzyme production)
In my studies I as never able to keep a goniopora colony alive for longer than 3 months AFTER it contracted (was infiltrated?) by protozoa. Most of the colonies I received to watch/treat became infected due to physical damage/abrasion of the tissue.
So my hot take,
if you want to kill a goniopora, let something rub up against it repeatedly, such as an overzealous clown fish. Granted there are always exceptions to the rule, as some of the above images seem to suggest, but I can tell you from first hand experience I had a pair of ocellaris kill a beautiful, melon sized colony of neon pink goniopora after about 18 months of the clowns constantly swimming through the polyps. All it took was a very small amount of tissue damage that was overtaken by a secondary infection. Nothing stopped it, fresh water dips, iodine dips, treating with OTC medications, nothing.
I do believe gonis can be kept successfully in the home aquarium, I think their success is dependent on two things:
1. high turbidity relative to the crystal clear water expectations we have as reefers
2. food items of appropriate size, I am a firm believer the difference between tanks where G. stokesi thrive and those who experience decline have a higher level of planktonic organisms, I do not believe photosynthesis alone is enough to properly provide for Gonioporas.
Here is a picture of my green g. stokesi colony from a week or two ago. You can see on the tips of the more mature polyps pronounced nematocysts (the stinging cells). I believe these are used both for capture of live foods but also for "chemical warfare" in the competition for space on the reef.