Does Apple Time Machine encrypt the backup on the client or the server / target?

Time Machine encryptions happens on the client. It is the Mac that is responsible for the encryption when you (on the Mac) have chosen to make encrypted backups.

The fact that you store the backups on an encrypted ext4 disk just means that the data is encrypted once more. This doesn't give you "double security" or anything like that, but it also doesn't hurt anything.

The difference in speed would most likely be negligible. There is some overhead involved in encrypting the data of course, but the network connection for the Raspberry Pi is probably going to be the bottleneck. Any reasonably modern Mac won't have problems encrypting data for that transfer speed, and they do it without any really noticeably slowdown.