My solution to prevent this would be to only allow switching the acceptance to a different answer, and not removing it entirely after a certain time. 

Being able to change the accepted answer even after a long time is important, but I don't see a realistic use case for unaccepting an answer completely after a few months or so. 

If you find an error much later, you could still work around this by posting your corrected solution as an answer and self-accept that one. 

I'm not yet convinced that this is a problem that happens often enough to warrant such a solution, this is the only case I heard about so for.