Yes, PieFed works great with Cloudflare, including with a Zero Trust tunnel. It is best to exclude the path /inbox from Cloudflare's WAF.
See https://codeberg.org/rimu/pyfedi/src/branch/main/INSTALL-docker.md to get started and also some of the bits and pieces in https://codeberg.org/rimu/pyfedi/src/branch/main/INSTALL.md apply to the docker method too. See how you go.
If you join the PieFed Security Announcements matrix room then you'll be among the first to hear about any security issues. Or the admins channel on https://chat.piefed.social/