I replaced the battery on my pixel 4 about a year ago.
I mustn't have done it properly (maybe loose connection?) because it still has power issues (but they're less predictable now).
It's worth a shot IMO, batteries are pretty cheap compared to a replacement device.