Is there an alternative to FCM and APN?

I mean there is unified push but developers need to implement that

tbh I don’t use notifications at all for weird reasons I just open apps randomly throughout the day. And I don’t give notification permission

This (Gotify) doesn’t really seem like a drop-in replacement for FCM (Google Play Services).

Unified Push needing to be implemented by developers is true, but for a privacy-respecting application, it probably just should be. The developer also needs to implement FCM; I imagine the APIs are pretty similar.

Yes, and the most straightforward alternative is to maintain a permanent connection to the server. On mobile devices, this increases power draw and is not ideal, but this is what apps like Signal do on degoogled devices (WebSocket). In that case, the alternative is to use Molly with a self-hosted Mollysocket.