You need a MollySocket server to use UnifiedPush with Molly. You can host it or yourself, or use a public instance. I've seen https://adminforge.de/services/mollysocket/ mentioned here. I don't know if it's good, but it should be reasonably safe in the sense that the hoster cannot read your messages. See MollySocket's README section on security.
That said, there's nothing wrong with using Molly's persistent WebSocket connection. I've heard it used to consume a lot of battery in the past, but that's not my experience.
With UnifiedPush you may save some battery consumption if you use more than one app with it. For example, Molly, an IRC client, and a Matrix client. See this list of UnifiedPush-compatible apps.
The way it works with Molly is that MollySocket registers itself as a linked (Signal) device with a persistent WebSocket connection to Signal. Upon receiving a message (which it won't be able to decrypt, see above) it sends a notification to a UnifiedPush distributor (server) such as Sunup. The distributor then forwards the notification to the distributor app on your phone, which in turn, tells the Molly app on your phone to check for new messages.