Installing a coaster brake is pretty easy I'd say. I used a Shimano CB-E110 coaster hub, which has 110 mm spacing. You can take the hub apart pretty easily and add spacers to make it fit a frame up to 130 mm rear spacing without having to change the whole axle for a longer one (changing the whole axle is not very hard, the hard thing is finding a longer axle).
Anyway, for this build I chose to space out the wheel symmetrically, because it seemed easier at the time. However, this causes the chainline to be pretty fucked, which is why I used alu spacers to bring in the chainring up front by 5 mm. I haven't measured but I'd say the chainline is pretty good right now. You could also space the hub in such a way that the chainline will be better, but then you'd have to dish the wheel to make up for the asymmetric spacing.
Wheel specs: Dartmoor Shield 26" downhill rims, Shimano CB-E110 coaster hub on the rear and Shimano DH-C3000-3N-NT on the front, both laced with DT Swiss Alpine III spokes.