To maintain your independence and freedom you must create value for yourself, you must be needed and wanted. The more people rely on you, the more freedom and independent you are, you are the one in control.
As usual, here is a little meaningful story to illustrate the rule:
Two computer engineers were working for an IT company, they graduated both from the same university and they have the same degree. They have been recruited for a trial period of 6 months for them to prove their competencies. The first one was doing all the job very excellently and professionally, he was always reading actualities about the IT field, he learns newest technologies and was able to provide bright ideas. But the other person was doing his job as well, but he doesn't go the extra mile in giving new ideas neither reading actualities.
At the end of the trial period. The time of deciding who to keep and who to fire arrived. The manager called both of them and told them "I really want to keep both of you, but one of you should leave" both engineers were scared of the decision. The manager said to the second engineer: "We are sorry, you are the one to leave. In fact what you did for us, any one can do it". And turned his head to the first engineer and told him "Congratulations! We really need your talent and your know-how especially about the newest technologies and your abilities to learn new things and your brightest ideas".
Be the only one who can do what you do, find your strength and make it more solid. Understand this: doing things right is not enough, you will find thousand of people who can do it the right way or even better. Look at yourself and find something you can do exceptionally, something about your personality as we are different then you must be unique. You should always create a need for yourself, otherwise you ll be ignored easily at first opportunity.
You should find out how to create a dependance, meaning how to make people dependant on you. To help you start, look at what people need. Then work it out, be the one to do it even if it would take extra time, invest time in learning, searching, practicing, anything you can do to be the one who will fill this gap. Make sure that this would create a difference. People will need you to fill that gap to provide them with your values and abilities.
To be fully independent, you should be in a state where people requires your services. People should feel very weak without you, they can't function properly if you didn't give your input. If you are absent for a short time period, they should suffer a lot and find it very difficult to do without you or even lose a lot of money and time to find another person who can do what you do. You should be irreplaceable, you should be unique. If you can make it, then you are free, you are independent and you can ask for anything, raise, benefits,...you can find job opportunities easily anywhere, you will fear more secure than before.
Louis XI, The king of France (1423 - 1483) had a weakness for astrology. One day the astrologer told the king that a lady in the court will die whithin the 8 coming days. And this came true and really a lady has died. Louis the king was terrified because he thought that the astrologer murdered the lady to keep his position as the astrologer of the court. The king wanted to get rid of him because he started feeling unsafe with him and he decided to kill him without he knows. The king asked asked his man that after he gives his signal they throw him from the window down to the valley. The astrologer was called to meet the king. Before giving the signal, he told him "You claim to understand astrology and you know the fate of others! so tell me what your fate will be and how long you have to live" . The astrologer responded : " I shall die just three days before your Majesty". As a result, the king's signal was never given and more than that the astrologer was protected for the rest of his life because the Kings' life is dependant on the astrologer's one. Later on, the king died first before the astrologer disproving his power.
This is the model you should work on. Make others dependent on you. Getting rid of you means a disaster will happen to them, which put them always under your mercy. There are many ways to obtain such a position. You can possess a talent and creative skill that simply can not be replaced.