Is there a SSR like device that can switch at kHz frequencies?
What you're describing is an adjustable switch-mode buck voltage supply. These exist. As a matter of fact, you're quite possibly using multiples of them to access the internet :D

And: whilst 4.2 A isn't "small" current, it's also not heavy duty, so you'll be able to design one with the online power designers that e.g. TI.com has. I don't know what your maximum operation voltage should be, but it's probably easiest to use an off-the shelf 48V supply and design a buck converter with Vin=48V, Vout=24V, Iout=5A (headroom is always nice), and then adapt the control loop to be adjustable to your needs (often, you can "hijack" a current limiting input by adding a constant voltage e.g. from a DAC to the feedback voltage).

You'll notice that you can pick topologies that are isolated; however, that's typically pretty complex. One could argue that your 48V supply should be the one that's isolated together with the control interface, and that thus you don't need isolation in your adjustable power supply.

Something that'd, in my book, work would be:



Since you want adjustability, you'd remove the connection between the Rfbt/Rfbb voltage divider and the FB pin, and replace it with an opamp adder, where you add the voltage divider voltage to a 0-0.8V voltage generated by a DAC. Since generation of reference voltages is a very PLC thing to do, chances are you've already got an isolated DAC available (you might need to use a voltage divider to adjust it to your 0-0.8 V range).