>Bolsanaro was already in power when this happened, so there is little reason to suspect him of wielding power over the courts or anything like that.
Bolsonaro had only made one appointment to the Supreme Federal Court at the time of the judgement in favor of Lula in 2021, while 7 of the 11 had been appointed by Lula or Dilma Rousseff. Yes, Lula was not in a position to pressure the supreme court as president but I don't think one should assume he had zero influence either. I'm not intimately familiar with Brazilian politics though and wouldn't want to unfairly imply any of the judges were in any way corrupt so I'll just leave it at that.