Berkshire is almost fully rules based. His rules told him it was time to sell, and he did. Probably wasn't fortune telling. In 2017 the fed was getting ready to tighten which was likely part of it.
The vast majority of the 3X walmart was pandemic money printing, which no rule could predict. He missed NVDA too? So does that make him bad at investing?
You only have to be right in the market 55% of the time to beat it handily.