Let us go back to fundamentals briefly: A Moodle site comprises three parts
- The code (often in a folder called moodle)
- The database
- The uploaded files (often in a folder called moodledata).
All the content that makes up your site is in 2) and 3). 1) Controls how that data is displayed, and how it gets updated.
So, if you wipe and reload the database, then you will lose all your content. (I think that answers your question 2.)
What you could do, is to Create a new Moodle site, and transfer the content from the old one, one course at a time, using Moodle's backup and restore. That might leave you with less junk in your database.
However, the junk in the database is not a bit worry. Let's try an analogy. Suppose you have an old lamp in a corner that is not plugged into your house's electrics. That is not going to do any harm (e.g. cause a short circuit, electrocute you, or start a fire). It is just going to take up a bit of space. The trouble will only come if you actually need to turn that lamp on. At that point, the fact it is not plugged in means it cannot work.
The error message you got originally is similar to saying that one lamp is not plugged in.
Now, if you are house proud, then you might actually want to know who left that lamp there, but that is the cause of the problem: the person who left the lamp there unplugged, not so much the lamp itself, but if it is a one-off event, it is probably not worth spending too much time on. If you want the space back, throw away the lamp.
However, it may turn out that you have a malicious child/cat/something living in your house, who delights in going round unplugging all your lamps at random time. If that is the case, then you have real ongoing problem that you need to find and fix. That would be like a software bug, but to make progress, you really need to catch them in the act to learn what is happening.
If it turn out that the lamp is really important to to you, then you could plug it in again. However, given the way the Moodle database is structured, that is more like finding the right plug and the right socket in the middle of a huge tangle of wires, mostly with incompatible plugs and extension sockets, than just plugging one lamp into the socket right next to it. (I think that answers your question 1)
[Cool! I think that analogy worked ]