Your question is relevant but has mostly not definitive long standing answer in either way. Nothing is eternal: registries can change and eligibility rules can change. Policies on dispute and trademark infringements can change too.
First you need to divide the world among gTLDs vs ccTLDs and making sure to take into account edge cases, like .tv or .co which are administratively ccTLDs but being run and marketed as gTLDs.
All gTLDs are governed by ICANN rules and policies. You can see the list of those policies at: https://www.icann.org/resources/pages/dns-2014-03-19-en
Among those you have the UDRP (and URS for newer gTLDs) that basically provides a first step out of court mechanism for trademark owners to dispute some domain names.
This is mostly stable for now, the specific points in the policy to define if a domain is infringing a trademark have not changed. This is of course extra to any procedure in front of a court, which can happen in any TLD.
With UDRPs it also happen that there are attempts of "reverse hijacking": entities claming to have a trademark, that was in fact registered after the domain name in an attempt in fact to get back the domain name. Sometimes this is spotted, sometimes not. Have a look at http://www.circleid.com/posts/20161020_understanding_reverse_domain_name_hijacking_under_udrp/ for examples on this.
Often, gTLDs are more open than ccTLDs: ccTLDs often put restrictions on who can apply for a domain name based either (typically) on the registrant citizenship or place of residence (that must be inside the country related to the ccTLD, or the surrounding relevant meta level, like the European Union for European ccTLDs).
Technically, any ccTLDs could change its restrictions. It happened in the past but more often it is to lift restrictions not to add more.
gTLDs can change their eligibility rules too, but it just needs to go through some ICANN procedures.
You also have TLDs that went bankrupted and stopped to operate. Some, specially gTLDs, are covered by "backup operators" so that existing domains do not disappear suddenly, however a TLD failing can happen and some predicts it will happen more and more in the waves of many new TLDs and newer ones to come.
Another important point that is often completely forgotten: depending on the TLD you use you might be under different national laws.
For gTLDs, you may at least always depend on US laws (because ICANN at the end of the day is an US entity). But then you need to take into account the registry jurisdiction and the registrar jurisdiction!
If you buy a .CAT domain name for example (technically a gTLD), through a Canadian registrar you may in fact depend on:
- US laws because of ICANN and it is a gTLD
- Spanish laws because .CAT is run by a Spanish entity
- Canadian laws bacause you are using a Canadian registrar.
And your own nationality may add its own laws.
Added together that can create a difficult mix of rules about trademarks as their treatments is not uniform. For example priorities between rights on names for individuals and trademarks is not the same everywhere. Like for the famous milka.fr case that showed at least in France trademark rights being "higher" than personal names rights.
It is not often well known (for example if you register a .COM people are not necessarily understanding they will depend on all US laws, including things like DMCA for example) and not very clear because at best it is added in contract by reference (like the registrar saying it depends on jurisdiction X with disputes to be settled at court Z from place Y, but by reference it includes the registry contract which may have similar clauses and if the registry is for a gTLD then it includes by reference its own contract with ICANN).
So for an exhaustive panorama you may need to handle this as well.
TL;DR
- carefully read registry rules on eligibility for the given TLDs you are interested with
- "am I always secure to hold the domain name provided I renew it in time": technically never, because if you read all contracts you will often find fineprints such as "the registry may revoke any domain name at any time for any reason like security, etc." (it is worded less clearly than that but the effects are the same). Look at registrars contracts too since you (almost) never deal with a registry directly, and there are cases of registrars in the past just ditching a customer for whatever reasons, like bad press attracted by some websites
- if you are not blatantly infringing a trademark at registration time, you should be ok, if you pay on time and if nothing changes, but this will never be a 100% guarantee.