Keep the dose as low as possible and use only when you absolutely need it is as straightforward as it gets. And don't use it recreationally, you're really going to pay a hefty price for all those doses that you didn't need but felt bored or got some other excuse to take them anyway. Unless your weight is high enough to justify 4 mg of alprazolam, it's way too high of a dose to use it every other or third day and feel all right, after weeks or months it will inevitably lead to problems.
I had been addicted to benzodiazepines for 9 years, mostly clonazepam at 6mg a day, but also during the first 3 years 7.5mg of lorazepam a day and 2-4mg estazolam here and there, I quit 5 years ago and it was a life-changing decision for me, hard as well on par with quitting methadone but well worth it. but during the last 1.5 years I had two bouts of disabling anxiety/panic attacks lasting several months and I started using alprazolam at 0.5mg pretty regularly, in 2-3 weeks I found myself taking it every day and eventually ended up taking up to 1.5-2.0mg a day after 2 or 3 months. I took many different benzos, ones that I took regularly were clonazepam, lorazepam, estazolam, and now alprazolam and short-acting ones have always been much worse in terms of withdrawal set-off and tapering. For anxiety that comes out of nowhere and panic attacks alprazolam is the best IME, but it's also very easy to get used to taking it every day because when you need it regularly, even short-term, you will feel off between doses, so you will feel urge to take it even on better days when you don't really have full-on anxiety. I managed to take a single dose of 0.5mg a day for many weeks, but the very first day without it is increased anxiety, slowed down thinking and complete lack of focus. Recommended treatment period is max. up to a month and in my experience I was indeed crossing a line somewhere around that point, but I believe you can still quit it fairly painlessly even after a few months of every day use provided that you did not take more than therapeutic doses.
I managed to stop two several-month alprazolam "binges" by switching to clorazepate two times in those past 1.5 years. The rebound anxiety and the lack of focus were unbearable and the great difference in effects between 0.25mg and 0.5mg makes it impossible to taper, even if you cut 0.25mg into 4 pieces, tapering will never be as smooth with a short-acting one as with a long-acting one. By switching from 0.5mg of alprazolam first to 0.25mg alprazolam+10mg of clorazepate for day 1, then 10mg of clorazepate alone for 2-3 days to build it up and then 5mg for a week or so, I was able to stop taking it painlessly when I didn't need it any more but couldn't simply stop alprazolam without feeling terrible. And taking 5mg of clorazepate 2-3 times a week when I can't bear anxiety is nowhere near as bad as starting alprazolam which in my case always inevitably leads to every day use.
For anxiety that stays with you all day long but isn't as pronounced weak and long-acting benzodiazepines are much more reasonable, even if you take them every day but don't go over the therapeutic dose, when you stop, stacked doses due to long half-life will make the transition off a drug much easier. I don't know why clorazepate, chlordiazepoxide or nordazepam aren't more popular to wean people off drugs like alprazolam even in situations when they've been taking them short-term at low dose but every day, it still makes sense to make a transition. Nordazepam is noticeably weaker than diazepam and seems to have the dose-response curve flattening, doubling the dose doesn't feel the same as doubling the dose of stronger benzodiazepines. I'm posting this because nordazepam and its pro-drugs are for some reason very rarely used and clorazepate saved my ass many times.