Yes it can be difficult if you need to reprogram the cars electrics but CAN Bus actually simplifies things enormously as just two twisted cores carry all the lamp signalling (amongst many other things) from the vehicle body/chassis ECU. Reprogramming is not always necessary either, the functionality 'on the bus' for some makes is there as standard.
So all that is needed, and what the manufacturers and aftermarket do in a near identical manner, is fit an intelligent black box with a two wire interface to the CAN Bus, and that could even be a plug and socket tapping , a 12v feed that can either go to the battery or be tapped into an existing fusebox position, a local earth and the black box then directly feeds the 13/7 pin socket.
No scotchlocks or solder taps to the existing lamp wiring are needed. It's one hell of a lot simpler than in the past and there is a need for just one voltage controlled relay for the (optional) split charging/cutoff, Absolutely everything else is on a circuit board a couple of inches square with a microprocessor and a handful of mosfets that drive the trailer lighting.
Even things like reverse light cutoff and fog lamp cutoff for the towing vehicle are signalled back from the black box across the CAN Bus to the vehicle body/chassis ecu, same with lamp failure detection, so no need to listen for a buzzer from the boot area or mount a lamp on the dash. Any trailer lamp failure is indicated on the existing dash panel just like any other lamp failure.