No, you still have it slightly wrong.
When you plug the car in (12S) the first relay will activate and disconnect the caravan battery so all 12V operation in the caravan is from the car battery.
That bit at least works centre relay does that.
When you start the car the habitation relay activates and disconnects the whole 12V system in the caravan except the fridge and the caravan battery
That it not happening. The lights continue to work.
- by definition if the car engine is running then it can and is supplying charge current to the battery as well as powering the fridge. In a modern 13-pin connection the fridge supply actually provides the charging supply as well, but under 12S the two supplies are independent.
Note also to regularly check the earth pins (4 and 7?) as they have a habit of getting hot and melting their mounting (most often pin 7) so that you fridge (and possibly charging also) may not work.
Table A721 - Functional allocation and cross-sectional areas of cores for caravan connectors in BS7671:2008 sets out connections and both BS EN ISO 11446 (13 pin) and BS AU 177a (7 Pin S type) both have two positive and two negative supplies, in my caravan the latter terminates in a 6 pin multi-coupler with just 5 wires, the 5th being Reversing light whatever Coding for coupled trailer is I don't have it.
I don't have the BS AU 177a wired up on our tow car, we are about to change it, and idea was to get caravan ready, I knew the caravan had problems, the master switch did nothing. I had two in-line fuses which gave an alternative supply to lights, and by-passed the master switch. So I removed fuses and have been attempting to return it to standard. Lighting was easy, just a blown fuse, the master switch it seemed easy to start with, but then realised all 12 volt was only from charger, the battery was simply not connected. Top fuse was marked "Van Batt+" so I connected battery to that fuse.
All now seemed to work, however seemed prudent to test it all. Found 14 fuses and 12 labels, but removing one at a time, it seemed the bottom 9 seemed to follow labels. And clearly the top one as I put it there. Which left one clearly unused and three left to work out two labels left are Fridge and Car. I tested with fuse removed and Fridge still works on 12 volt battery, used a small 7 Ah battery to emulate the car. And so I have two fuses not a clue what they do. However one seems to have not power at any time. And one fuse which only has power when an external battery is connected. Left side becomes live when connecting power to pins 6 and 7, and right when power is connected to 3 and 4, however not the power from 3 and 4 but the power from the caravans battery.
So if I power pin 3 and 4 then the caravan battery becomes connected to pins 6 and 7. So assuming it was connected to a car with all 4 pins connected then on turning on ignition the caravan battery would be connected to car battery. As long as the car has some device to stop current going from caravan to car that's OK.
However if the car does not have a one way device, be it relay or diode, then when the starter cranks or when the car is under load and engine management switches off alternator then car will be likely using caravan battery. Which is the reverse to what is wanted.
Before engine management controlled alternator output a voltage dependent relay could be used so car only connected when alternator is charging, however that no longer works, it would result in the power to caravan being switched on/off all the time, OK for charging, but not for fridge operation.
I have not read how modern cars are wired but I would guess a relay not voltage dependent but just connected to an ignition circuit and a diode to prevent draw from caravan? Since there is a 0.6 volt drop through diode in the caravan it will require a DC to DC inverter to lift the voltage up again.
However removing fuse 5 so caravan battery is not connected to car would remove need for diode in car, not sure however I would want to take the chance that a trailer with battery connected is ever plugged in, safer to fit diode anyway, clearly to both supply's but the standard blocking diode has one input and two outputs anyway so not really a problem, the relay contacts clearly after the diode.