I think the three main factors that are very important are comfort, the coach and the support of the supporters. It looks like Messi went to PSG because the salary is quite high for an age measure like him. In addition, in Paris Messi does not seem to have gained comfort in life. Then PSG fans also insulted him a lot because of the bad game. I think this accumulation made Messi have to leave. He needs a place where they are rewarded for the effort they have put in. A short year of time, but Messi is gone it proves PSG is not the right home for him to retire.
This factor is indeed quite important because after all players need comfort when they are at the club. Training is also one of the triggers for how the club can compete in the competition because even though there are many star players if the coach is unable to integrate players, the conditions are exactly the same as what happened at PSG. Messi will not be able to make changes on his own because football talks about collectivity while playing, while the coach has a big enough role to make all of that happen and if the coach does not have the ability to lead then the condition will not work
Even at the start of the 2022/2023 season, the news circulating that Neymar, Messi and Mbappe were not harmonious, so this was also one of the triggers that made PSG so inconsistent. Maybe it's true as you say that PSG is not the right club for him and blaming Messi individually is also not the right reason as PSG fans do.