I'm asking because there's always more to learn and I'm worried about coming across as naive at best, idiotic and absurdly wrong at worst whenever discussion of history comes up.
You don't. Impostor syndrome is endemic in academia. But that doesn't answer your question.
You've never really arrived, but to have intelligent opinions I would suggest as a rule of thumb that you've read at least 10 books on the topic, at least seven of which are academic (e.g. it was written by a historian and includes substantial citations), and that you can describe in a general way the different historiographical emphases and disagreements among the authors. These numbers are arbitrary, of course. There is always more to read, while, on the other hand, with experience you can learn tricks to make the process easier.
As far as making your own work, if you mean a book, that would require far more than what I sketched above. Hundreds and hundreds of hours of reading.
Most of the time, it's a question of method, not necessarily information. You can look up every possible piece of information about a given topic, and whether you "know enough" will be apparent from the way you process that information and come to conclusions about it. Do your conclusions account for at least most of the information? Do they account for outside factors like historical and cultural contexts? Can you tell the difference between what you want the conclusion to be and where the evidence takes you? When you're using specific methodologies, do you understand how they work well enough to apply them in consistent ways to new material? Are you cognizant of the logical path you took to get from the information to your conclusion?
Learning to do history is about practicing at interpreting information. Intelligent opinions are ones that are more or less consistent with the available evidence, show command of the thought process, and are offered in good faith. One thing to remember is that there are holes in everything. Every opinion can be challenged. Every theory has factors that it can't 100% integrate. Some are far more airtight than others, and most can be applied to some types of information better than other types. A good scholar will be aware of those limitations (even while testing them) and be open to revising their ideas with new information or perspectives.