You can't use the domain name for the same activity (the same Nice class https://en.wikipedia.org/wiki/International_(Nice)_Classific...) as the company with the same name that has a trademark for the same activity class.
If you follow this rule no company will be able to contest your domain name.