It depends on what you need.
For a beginner, an electric cooker may be better. It can steadily heat the herbs and the temperature can be accurately adjust. It helps to keep the active ingredients of the herbs in good conditions.
From an ancient perspective, heating the herbal tea with an open flame is the action of puting yan(陽) on (yin), and such a combination of water and fire is the way to retain the balance inside our bodies. However, this theory lacks clinical evidence.
Some specific herbal tea boiler even has timer to prevent overcooking. It stops when evaporation makes the herbal tea become an amount of a bowl. Beginners love this design as they do not know how much time it takes to boil herbal tea.
However, it is always easier to clean a pot than an electrical herbal tea cooker. That is why Asia mothers still love traditional pots.