Haven't been here in a while but I saw the betta topic and thought I'd contribute some things. I've had a number of bettas, six, and they're sort of a crap shoot overall. Many genetic issues, many prior poor treatment issues, both of which can result in a short lived fish and there's really no way, unless you deal directly with breeders that have strong, long lived fish, to know how things are going to go.
Tank size isn't terribly important from an ammonia standpoint, since they generate little ammonia. I've tested juvies in a one gallon temp container and it takes almost 24 hours for ammonia to be detectable with liquid kits. That doesn't mean a gallon is OK, although some dedicated keepers who are willing to change all the water daily have used that system forever. Takes a lot of diligence and IMO, that's not enough space for the fish to swim, but OK for a while in a store; good betta sellers spend most of their time changing water. Ours have been in eheim aquastyles, 6 and 9 gal and a 6 gal fluval edge. They display better in the eheims, the 6 gal edge is too short.
It's very, very easy to cycle a 5 gal or larger betta tank just by putting one betta in and changing lots of water frequently based on test results. Takes some knowledge, or at least willingness to do what you're told to do this smoothly. There's always amquel or aqua safe plus if things go haywire, but big pwc's still rule. Regardless of method, testing and developing toxin profiles are v. important during cycling; I mean write down test date and times and ppm's.
Personally, unless I'm absolutely sure the fish I'm introducing is clean, all new fish go into QT for 2-3 weeks with bacteria and parasite meds. I didn't do this when I started keeping fish years ago and wound up with a dozen tanks with camallanus, flagellates and bacterial infections, which taught me a huge amount about meds the hard way. We got lucky, at that point there were 40 tanks running! Same goes for plants, none go in without a long alum treatment, except tc's and those tube plants, unless I'm sure of them.
Of the first three bettas we bought, two were from P stores and the third from a good LFS. Two were halfmoons, one a crowntail. All three were put in cycled tanks and died within a few months. They all developed that intractable fin rot that antibiotics or MB dips or furacin green or metro or sulfa or...won't do anything about. In retrospect, none of those fish were in good shape when we got them, but we didn't know. One developed popeye, something doxy is great for (they all died in qt's) but after sitting for probably weeks in ammonia stew in the store after being shipped from Asia, his organs probably shut down. The other two just had melting fins but wouldn't eat and probably had latent ammonia damage, too.
The next three were selected more carefully, a red/blue halfmoon and a dark blue crowntail from P-Smart. We learned they were shipped in a green liquid (furacin green, maybe) and learned which day new shipments came into the local P stores, so we got two that were zippy and still in green water, the same day they were delivered. Our tap is pH 8.3, GH 400 ppm and P-Smart just dumped the shipping water, filled the cups with liquid rock and plopped the fish back in. Welcome to USA, ouch! Here's some nasty water that will make any amount of ammonia toxic, we'll be back in a week to change it! I gave up trying to explain they should replace the bay-tuh's cup water daily when I learned one associate just moved from small animals and was trained on fish that morning. That's all the training they got.
The third one was a blue over black halfmoon orchid I got from E bay All three went through thorough qt with meds and were super zippy when they were put in their tanks, really strong! The red/blue halfmoon did OK for a month, then started melting. I got it sort of under control in his display with sulfa but it still progressed slowly and after 3 months, he died with almost no fins and popeye in qt. The other two lived for 3 years, pretty long for these guys and were beautiful fish. They just got old and faded away eventually, good finnage, no internal infections.
BTW, I've always used RO with Ca and Mg added to dGH 6-7 and pH to 7 with bicarbonate. I can move fish very easily when the tanks are all the same, since shock occurs from sudden big pH and GH changes.
Since my early mistakes tought me a lot about meds and I had cured some really messed up fish, I was sought out by many betta owners to try and help their fish, most of which had melting fins. Some had bacterial skin ulcers from filthy tanks; those are easy to treat and responded well. I sorted through the well meaning hobbyists who dumped treats into their tanks relentlessly and had absurdly fat fish, the ones who bought every "happy" chemical sold and the ones who decided it was good to stir up the substrate really well before doing a small pwc and never could seem to maintain zero ammonia. They all cleaned up their acts and had clean water for the first time after some discussion; good efforts by all.
There were knowledgeable hobbyists who used modified RO, counted pellets, fed once a day, no treats and had clean tanks; with melting fins, too. We experimented with a number of meds, the hobbyists who could do a qt used doxy, metro, MB dips and furacins. The ones who treated display tanks used kanamycin, sulfa, metro and MB dips. They had all tried paraguard and some, salt (yuck!) Nothing stopped the melt progression; some of these fish had almost no fins when they died. We joked (it helped some) that they were reverting to their wild configuration.
The disappointing part of all this was that meds that worked very well on many other kinds of fish had little or no effect on these bettas, leaving organ damage from ammonia poisoning during shipping and/or store treatment and genetics as likely reasons.
It seems there's likely a big genetic component to many betta's early demise, they're very selectively bred and are far more delicate than livebearers, cichlids or other typical hobby fish. Oto's are tricky, but if they're introduced correctly, do well and can live a number of years.
Fancy goldies are genetically dubious similar to bettas but not nearly as much. Been through the same issues with many of them. They too, have been bred for centuries, sometimes into bizarre forms, just like bettas. Neither can swim worth a darn! I have one blue platinum veil angel, 5 yrs old and beautiful, sharing a tank with the small variety of gold nugget pleco/hypo. Started with 5 angels, they were a new strain at that time and genetics were not so good yet. The angel has a missing operculum on one side, doesn't seem to matter much, though.
So, I kind of rambled, but hope our fishy adventures are of some value. I tell hobbyists who want bettas all the things they can do to give their fish good conditions and tell them they may have to go through more than one or two to get a good one. Those who lost one usually go for apparent vigor on the second one even if their finnage or color are different from what they really want.
An entire world is in your tank.