Mesa have a product called spinx or similar, converts digital pwm to isolated analogue out.
The new image I'm working is created using the same utility that Raspberry Pi company uses to create their own images, so basically raspios with a real time kernel and Linuxcnc pre installed. Far more raspios than the previous.