As @riban mentions I have done a little in this regard.
as with all my threads it’s a bit of an epic . . .
But it works very well.
My machine zynthian-amp2.local also runs with a hifiberry amp2 card and just … works.
The issues are you don’t get an ausio output, everything goes straight to the speakers and you dont have an overall volume control as we haven’t worked out quite how to implement that yet, but as a device for playing MIDI to a couple of speakers it’s great. I’ve lent it to completely non technical people who have just used it as a piano, and no complaints.
Your best option is probably purchase a small class amplifier board and run the speakers and headphones from that wired on to the normal zynthian output connectors.