Kinda bullshit, kinda not. It was always an urban legend until Batterygate a few years ago.
The nuance a lot of people missed there, was that older batteries would just completely shit the bed and shut the phone down if the phone pulled too much power from them, so Apple throttled the CPU down to prevent that power draw. On the one hand, they could/should have just alerted the users that it was time to get a new battery (as opposed to replacing the whole phone). One the other hand, if convincing you to buy a new phone was the goal, allowing your old phone to fail catastrophically probably would have been a better play.
They got sued for that. I don’t know if they still do it though.
I think it’s more nuanced than that. My understanding is that, as the battery degrades, the system limits how fast it can run. If they were to allow it to keep running full speed, the phone would die super quickly. So they made the decision to limit the phones speed to prevent that and that they were sued because there was no transparency about the underlying speed limiting/battery saving processes.
Which is also why when you get a new battery your phone feels super fast again