Most of the smaller fishes would do better in larger tank.(10 to 20 gal or larger)
Five gallon tank's are much more unstable with regard's to temp,and water parameter's.
Water will alway's be more stable in larger tank's than smaller ones, and water stability weigh's heavy on health of the fishes.
Larger tank's are way easier to maintain than smaller ones, due to larger volume of water not so easily or quickly affected by temp changes, and or organic input ( number's of fishes ,fish poop,fish food's,).
The most important medication in your fish medicine cabinet is.. Clean water.