Let $(\Omega,\mathcal F,P)$ be a probability space and let $\bar{\mathcal L}(\mathcal F)$ denote the set of measurable functions $f:(\Omega,\mathcal F)\to (\bar{\mathbb R},\mathcal B(\bar{\mathbb R}))$. Given a subset $\mathcal S\subset \bar{\mathcal L}(\mathcal F)$, the essential supremum of $\mathcal S$, written $\text{ess sup } \mathcal S$, is defined as any $f\in \bar{\mathcal L}(\mathcal F)$ satisfying
$f\geq g$ a.s. for all $g\in \mathcal S$.
$f'\geq g$ a.s. for all $g\in \mathcal S$, then $f'\geq f$ a.s..
Clearly the essential supremum of $\mathcal S$, if it exists, is unique a.s.. The essential infimum of $\mathcal S$, $\text{ess inf } \mathcal S$, is defined similarly, replacing inequalities $\geq$ by $\leq$ in the above definition. If $\mathcal S=(f_n)$ is countable, then $\text{ess sup } \mathcal S=\sup_{n} f_n$ and $\text{ess inf } \mathcal S=\inf_{n} f_n$ a.s. since the pointwise supremum/infimum of a sequence of measurable maps is measurable.
The answer here proves the following theorem using Zorn's lemma. I wonder if this is really necessary.
Theorem. $\text{ess sup } \mathcal S$ exist for any subset $\mathcal S\subset \bar{\mathcal L}(\mathcal F)$. Moreover, if $\mathcal S$ is nonempty there exists a sequence $(f_n)\subset \mathcal S$ such that $\text{ess sup } \mathcal S=\sup_{n} f_n$ a.s.. If $\mathcal S$ is upward directed then the sequence $(f_n)$ can be taken to be nondecreasing a.s.. An analogous claim holds for $\text{ess inf } \mathcal S$.
Proof. We will show the claim for $\text{ess sup } \mathcal S$ ; the claim for $\text{ess inf } \mathcal S$ follows by considering $- (\text{ess sup } (-\mathcal S))$. Clearly $\text{ess sup } \emptyset=-\infty$ so we can assume $\mathcal S\neq \emptyset$. We can also assume WLOG that $\mathcal S$ consists of nonnegative and bounded real-valued functions, because the map $x\mapsto \phi(x)=\frac{\pi}{2}+\arctan(x)$ is an order preserving homeomorphism from $(\bar{\mathbb R},\mathcal B(\bar{\mathbb R})) $ to $([0,\pi],\mathcal B([0,\pi]))$. Indeed $f$ is an essential supremum of $\mathcal S$ if and only if $\phi \circ f$ is an essential supremum of $\phi(\mathcal S):=\{\phi \circ g: g\in \mathcal S\}$. Let
$$s = \sup \left\{ \int \max\{g_1,\ldots,g_k\} \,dP: \, g_1,\ldots,g_k\in \mathcal S, k\geq 1\right\}\,<\infty$$
For each $n$ there exists a finite subset $\mathcal S_n\subset \mathcal S$ such that $s-\frac{1}{n}<\int \max \{g \in \mathcal S_n\} \,dP\leq s$. Let $(f_n)$ be an enumeration of the countable set $\cup_{n=1}^\infty \mathcal S_n$ , let $u_n=\max\{f_1,\dots,f_n\}$ for each $n$, and let $f:=\sup_{n} u_n=\sup_{n} f_n$. Then $\int u_n \, dP \uparrow s $ as $n\to \infty$, and by the MCT we have $s=\int f \, dP$.
I claim that $f$ is an essential supremum of $\mathcal S$. First we show that 1. holds. Suppose on the contrary that $g>f$ for some $g\in \mathcal S$ on a set $A\in\mathcal F$ with $P(A)>0$. Then $\int \max\{f,g\}\, dP > \int f\, dP = s$. But $\max\{u_n,g\} \uparrow \max\{f,g\}$ so by the MCT we have $\int \max\{f,g\}\, dP=s$, a contradiction. For 2. we note that if $f'\geq g$ a.s. for all $g\in \mathcal S$ then in particular $f'\geq f_n$ a.s. for each $n$ so $f'\geq \sup_{n} f_n=f$ a.s..
Finally suppose $\mathcal S$ is upward directed, meaning that for any $g_1,g_2\in \mathcal S$ there exits $g_3\in\mathcal S$ satisfying $\max\{g_1,g_2\}\leq g_3$ a.s.. Then we can find an a.s. increasing sequence $(h_n)$ in $\mathcal S$ satisfying $u_n\leq h_n$ a.s. for each $n$. Then we can define $f:=\sup_n h_n$ and finish the proof as before.
Am I missing something?