The drafter of my PCT did very poor work and he put a restrictive term in the main claim of my PCT. What are my options to remove that term and expand my claim at the national phase or by amending my PCT without risking to invalidate my patent? The description describes an alternative embodiment which renders the restrictive term in the claim as invalid as it is incompatible with that embodiment but the drafter failed to realise that.
Different countries have different rules but there is normally no problem amending PCT claims when entering the national stage.
You ask about the risk of invaliding your (not yet existing) patent. If the amendments you plan result in claims that "go beyond" the original filing such that the resulting claims are not supported by the original filings AND the examination process does not catch it, the resulting patent could be vulnerable. I do not think that is a big worry, the examiners will be looking for that with every amendment.
There will be variations in how amendments are looked at. The EPO is very strict about claiming combinations and permutations of features that were not explicit in the original filing, for example.