So, my intention is.....
Remove the transformer.
Put a junction box in its place.
Wire in the Live and Neutral that currently go in to the transformer, as they are, into the new Junction Box.
Remove the connector block that is joining the earths, and put them both into the new Junction...