Wow, alot of stuff going on there.
If you are doing the rear main seal i would do the oil pan gasket and oil level sensor gasket while you are there.
As far as that disconnected connector, im not sure what that goes to. The one next to it that i believe powers the backup lights.
Looks...