Talk to the DM
So often, the simple (but not always easy) solution of communicating openly and honestly is the best solution. You want to approach them in a non-confrontational way, acknowledging that they are spending a lot of time and resources building the world and preparing for sessions. Then, about secrets, you want to work towards a "that's right" rather than a "you're right" (Watch videos about Don't Split the Difference by Chris Voss to understand the difference). Ask the DM open ended questions about his ideas on player secrets, how he believes they should be handled.
If your DM doesn't see things the same way you do, you can either adapt, or find a new game. You can't force the DM to treat player secrets the way you want him to. It is his table.
Favoritism
The same tact should be used about your perception of favoritism. I say perception because what you see might not actually be what you think it is. It could be exactly what you think it is, but it might be another thing altogether.
Personal life example: my daughter was friends with a number of other children at church. When the other children (of the same age) would do something wrong and wouldn't listen to adults telling them to stop, the parishioners would oft tell the parents and let them deal with it. On several occasions a certain parishioner (and friend of ours) would yell at our daughter if she didn't listen. It really bugged my wife, and she finally had a talk with her. It came out that because our daughter's verbal skills were ahead, she assumed her to be more mature, and "knew better" than the other children. When in fact, while she could articulate well, she had the same (if not worse) impulse control of any child that age. She expected more from our daughter, not because she was favoring the others but because she thought our daughter ought to know better.
In your case, it could be that DM forgot and let slip the familiar, or thought that a familiar was a "minor enough" secret as not to warrant the overhead of texting at the table - which, personally I wouldn't do as a DM because it slows down play. This other secret could have plot hooks for the whole party eventually, and might require less (or no) tableside texts, so the DM is more likely to accommodate it because of being "low overhead". OR, it could be that the DM is best buds with the other player and your perception is reality.
Whatever the case, talking to the DM about the issue is the only way to address how you feel, and seek some resolution. Again, employ all the diplomatic tact that you would if you were a hostage negotiator trying to maintain trust, respect and friendship. Don't argue, it won't accomplish anything; but do let the DM know how you feel and what you hope the resolution is.
Player Knowledge isn't Character Knowledge
The players now know your secret. The characters don't necessarily know. While this isn't exactly what you wanted, it can lead to some fun in its own right. Like maybe at the table, no texting during a long rest, while your character is asleep your imp steals something on your orders. The players all know, but their characters can't act on that knowledge.
I had the frustrating fun time in playing this out in a campaign once. I had suspicion that a player had an evil cursed sword. I managed to get ahold of the sword, and I asked the DM if I could tell anything about it. The DM had me roll a check to see I knew about this particular artifact -- and failed spectacularly. The DM said "Of course it is cursed, but with that roll your character thinks its as harmless as a kitten." He gave it back to the other character. When the curse kicked in (by meeting certain conditions), the DM told the player, "You see red. You are out for blood. You don't care whose." He began laying waste to townsfolk left and right. The characters were all in shock -- including mine -- but I was both loving the turn and hating not having been able to stop it.