In years to come with no warranty Bosch will be expensive to repair direct , though the likes of performance bearings to some degree may be able to repair some drives.Would it be possible to add a hub motor to a mid drive bike, of coarse using a different battery, display and controller.
That’s what I’m hoping to do when my Bosch dies and if no replacements are available. It seems wrong to discard a quality frame.
Eventually one would think used spares might become available indirectly.
Regarding converting to rear hub then yes anything is possible, if you have std 9mm QR dropouts, the crank drive would need stripping out a bit so that the cranks can rotate freely for the drive.
Battery wise one could use the existing battery or sell it for it's residual value, if one kept it the BMS/electronics would need replacing with any generic type, then it could be used with any generic controller/lcd set up.
I think Bafang and other China makers might have missed a trick and think they should have designed their drives so they could then fit straight in as a direct replacement.