I suggest using raycasts to determine how to place these things. If it hits the ground, just place it correctly on the ground and disable any physics to ensure predictable placement. If the raycast hits a plug at a close enough distance, place it there too. Maybe just make the plug hit box a bit bigger