Note. The quantity
$$\frac{\sec^2x}{\tan x}$$
is a trigonometric expression, not a trigonometric identity. The equation
$$\frac{\sec^2x}{\tan x} = \cot x + \tan x$$
is a trigonometric identity, meaning that it holds for all values of the variables where both expressions are defined.
Domain of definition of a trigonometric expression
To define the domain of definition of a trigonometric expression, you must make sure that each function in the expression is defined and that you can perform each of the indicated operations.
For the expression
$$\frac{\sec^2x}{\tan x}$$
we require that $\sec x$ and $\tan x$ are defined and that $\tan x \neq 0$ since $\tan x$ is in the denominator.
Since
$$\sec x = \frac{1}{\cos x}$$
$\sec x$ is only defined when $\cos x \neq 0$, so we require that
$$x \neq \frac{\pi}{2} + n\pi, n \in \mathbb{Z}$$
Since
$$\tan x = \frac{\sin x}{\cos x}$$
$\tan x$ is only defined when $\cos x \neq 0$, which leads to the same restriction as above.
Since $\tan x = 0 \implies x = n\pi, n \in \mathbb{Z}$, we have the additional restriction that $x \neq n\pi, n \in \mathbb{Z}$.
Hence, the domain of definition is
$$\left\{x \in \mathbb{R} \mid x \neq \frac{\pi}{2} + n\pi, n \in \mathbb{Z}\right\} \cap \left\{x \in \mathbb{R} \mid x \neq n\pi, n \in \mathbb{Z}\right\} = \{x \in \mathbb{R} \mid x \neq \frac{n\pi}{2}, n \in \mathbb{Z}\}$$
Domain of definition of a trigonometric identity
To find the domain of definition of a trigonometric identity, we must find the intersection of the domains of each trigonometric expression in the equation are defined.
Example. $\dfrac{\sec^2x}{\tan x} = \cot x + \tan x$.
$$\frac{\sec^2x}{\tan x} = \frac{1 + \tan^2x}{\tan x} = \frac{1}{\tan x} + \tan x = \cot x + \tan x$$
We showed above that the LHS has domain of definition
$$\left\{x \in \mathbb{R} \mid x \neq \frac{n\pi}{2}, n \in \mathbb{Z}\right\}$$
Notice that the expression $\cot x + \tan x$ is only defined when $\cot x$ and $\tan x$ are both defined.
Since
$$\cot x = \frac{\cos x}{\sin x}$$
$\cot x$ is only defined when $\sin x \neq 0 \implies x \neq n\pi, n \in \mathbb{Z}$.
We saw above that $\tan x \neq 0 \implies x \neq \dfrac{\pi}{2} + n\pi, n \in \mathbb{Z}$.
Thus, the expression $\cot x + \tan x$ also has domain of definition
$$\left\{x \in \mathbb{R} \mid x \neq \frac{n\pi}{2}, n \in \mathbb{Z}\right\}$$
Therefore, the domain of definition for the identity is
$$\left\{x \in \mathbb{R} \mid x \neq \frac{n\pi}{2}, n \in \mathbb{Z}\right\}$$
Example. $\dfrac{\sin x}{1 - \cos x} = \dfrac{1 + \cos x}{\sin x}$.
$$\frac{\sin x}{1 - \cos x} = \frac{\sin x}{1 - \cos x} \cdot \frac{1 + \cos x}{1 + \cos x} = \frac{\sin x(1 + \cos x)}{1 - \cos^2x} = \frac{\sin x(1 + \cos x)}{\sin^2x} = \frac{1 + \cos x}{\sin x}$$
The expression on the left-hand side is defined for all real numbers except
$x = 2n\pi, n \in \mathbb{Z}$. The expression on the right-hand side is defined for all real numbers except $x = n\pi, n \in \mathbb{Z}$. Since both sides of the identity must be defined, the domain of definition of the identity is the intersection of these two domains of definition, which is
$$\{x \in \mathbb{R} \mid x \neq 2n\pi, n \in \mathbb{Z}\} \cap \{x \in \mathbb{R} \mid x \neq n\pi, n \in \mathbb{Z}\} = \{x \in \mathbb{R} \mid x \neq n\pi, n \in \mathbb{Z}\}$$
Best Answer
In this context, I would recommend either:
Let me explain what I mean by (2).
There's this concept of universal quantification that all mathematics is based on. Its really important. If you understand it, math probably makes sense to you. If you don't, it probably doesn't. Unfortunately, this concept usually isn't taught until very late into one's university education, despite that essentially all of high school mathematics secretly uses it all the time! This makes mathematics look way crazier than it really is, which is a real shame.
So, let me try to explain it.
This will have the added benefit that you will know when to use $\equiv,$ in line with recommendation (2). Of course, you can always take recommendation (1) and just forget about $\equiv$ altogether... In any event, understanding this stuff is REALLY important.
Universal quantification.
Suppose we know that $\sin^2 \theta + \cos^2\theta = 1$.
Then obviously, we can deduce that $\sin^2(\theta+1)+\cos^2(\theta+1) = 1$.
(Think about why. This should be intuitively obvious. Don't read on until its obvious.)
Okay, suppose we instead know that $3x=2$. Can we deduce that $3(x+1) = 2$? Of course, we cannot. After all, the first statement is equivalent to $x=3/2$. The second statement is equivalent to $x=1/2$. Obviously, neither implies the other.
So what's really going on here?
Let me explain.
If someone says "we know that $3x=2$," then what they probably mean is exactly what they said. Basically, $x$ is understood to be some fixed but arbitrary real number, and we know that $3$ times that number equals $2$, or in other words that $3x=2$. We can then proceed to find $x$ (if we want).
But if someone says "we know that $\sin^2 \theta + \cos^2\theta = 1$," what they probably mean is: "we know that for each and every real number $\theta$, it holds that $\sin^2 \theta + \cos^2\theta = 1$." Obviously, we cannot proceed to find $\theta$ in this case, because we're talking about each and every possible $\theta$, not some specific $\theta$.
So if we want to be precise, if we want to denote things in a way that makes this difference in meanings clear, then obviously, we have to change our notation a bit.
The statement: "We know $3x=2$" remains unchanged.
But the other statement becomes: We know $$\mathop{\forall}_{\theta:\mathbb{R}}(\sin^2 \theta + \cos^2\theta = 1).$$
Let me explain how to read this. The symbol $\forall$ is verbalized "for all," or "for each," or "for every." A bit of terminology: we call $\forall$ the "universal quantifier." So the above pattern of symbols can be read: "for all $\theta$ in $\mathbb{R}$, it holds that $\sin^2 \theta + \cos^2\theta = 1$."
Often, we simply use words instead of symbols, so $$\mathop{\forall}_{x:X}[\mbox{blah blah}]$$ becomes: "for all $x$ of type $X$, blah blah."
Now please Google the words "function" and "predicate" if you're unfamiliar with these terms, because here comes the tricky part.
If you think about it, you'll see that if we're given a function $f : Y \leftarrow X$ and a predicate $P$ on $Y$, then from the statement $$\mathop{\forall}_{y:Y} P(y),$$ we can deduce $$\mathop{\forall}_{x:X} P(f(x)).$$ This explains how we got from $\sin^2 \theta + \cos^2\theta = 1$ to $\sin^2(\theta+1)+\cos^2(\theta+1) = 1.$ What's really going on is the following. We know that:
$$\mathop{\forall}_{\theta:\mathbb{R}}(\sin^2 \theta + \cos^2\theta = 1).$$
Now write $P(\theta)$ as shorthand for $\sin^2 \theta + \cos^2\theta = 1$. So we know that $$\mathop{\forall}_{\theta:\mathbb{R}}P(\theta)$$
Now define a function $f : \mathbb{R} \leftarrow \mathbb{R}$ as follows:
$$f(\theta) = \theta+1$$
Then we can deduce $$\mathop{\forall}_{\theta:\mathbb{R}}P(f(\theta)).$$
That is:
$$\mathop{\forall}_{\theta:\mathbb{R}}P(\theta+1).$$
That is:
$$\mathop{\forall}_{\theta:\mathbb{R}}(\sin^2 (\theta+1) + \cos^2(\theta+1) = 1).$$
which is what we were trying to show.
This explains why this pattern of reasoning works here, and not with $3x=2$. The notation $3x=2$ isn't shorthand for $$\mathop{\forall}_{x:\mathbb{R}}(3x=2),$$ since that would simply be false.
In summary, if we want our notation to make clear what the "rules of the game" are, then its a good idea to include the symbol $\forall$ or the phrase "for all" in our mathematical writing.
Returning to your original question.
Suppose you want to emphasize that the pattern of symbols $$\sin^2 \theta + \cos^2\theta = 1$$ is really a shorthand for the more correct statement $$\mathop{\forall}_{\theta:\mathbb{R}}(\sin^2 \theta + \cos^2\theta = 1).$$
Then, if you want, you can write $$\sin^2 \theta + \cos^2\theta \equiv 1$$ to emphasize this.
Example.
Let me finish by illustrating how and when to use $=$ versus $\equiv$, in line with recommendation (2).
Proof. Let $x$ denote a fixed but arbitrary real number. Then the following are equivalent.
Hence $1+\tan^2x \equiv \sec^2x$ over the real numbers. This completes the proof.