I'm travelling there for the first time, as a woman alone I wouldn't like to have nasty looks tbh (or even be yelled at as other user suggested), not want to bother, know to behave and just want to get to know the city along with other places in Europe.
I think the yelling at tourists is mainly going to be if you're doing something stupid (though some of those are non-obvious: e.g. taking pictures in clubs is mostly a no-no). I probably wouldn't mess with trying to get in to Berghain. Other places you'll have a decent shot. If you want to go like a pro, show up from 4-6 a.m. instead of midnight with the tourists. The pros come out late, and the lines are shorter and the dancefloors are less packed -- if you actually like to dance, later is better. I'll sometimes even go out on Sunday afternoon.
It's not about just line length, you would have to fit in and seem non-tourist to get into Berghain, and then you'd need to actually enjoy a dark, brutal, kink and techno club full of intentional degeneracy. I would absolutely go, for the music, but wouldn't be as much into the kink side, which I think is escalated somewhat from what Tresor was?
There's a good documentary on the history of Tresor: "Sub Berlin - The Story Of Tresor" which appears to even have a re-cut version on youtube: https://www.youtube.com/watch?v=iiuJhq-z2LE
I get it though, where I live we have desert undergrounds and parties up in the mountains with a vibe that is threatening to be overrun by tourists. To say nothing of all the plug-in camps popping up at Burning Man...
Also be prepared to be denied entry. It's allowed and not uncommon, especially for some specific clubs.
Also, often tourists aren't accustomed to Berlin's marathon club opening times (some clubs don't close on weekends) and end up too trashed and are annoying. So, yeah, tourists have a harder time at the doors.
Honestly, I've only been to Tresor once. It's kind of a misnomer since it's named after a very famous, very important long-closed club in a different part of Berlin with a totally different vibe. The current incarnation ... it's probably fine. Like, there are a handful of clubs in Berlin that actually feel a lot like the clubs Berliners do go to, but are mostly there for tourists. You can spot them because ... you can spot them. ;-) (Good rule of thumb in Berlin: if you can easily find the entrance, it's for tourists. Most of the more scene-y clubs don't have a sign.)