This study investigates and evaluates applications of the adjoint problem and its solution in frequency-domain computational electromagnetics (CEM). The study establishes and validates adjoint-based applications including higher order parameter sampling, a posteriori error estimate evaluation, and $p$ - and $h$ -refinements. These applications can improve the efficiency, automation, and robustness of CEM methods. We employ a 1-D finite-element-method scattering solver, simplifying the implementation, replicability, clarity, and intuitiveness of analysis results and conclusions, which then extend naturally to higher dimensional solvers and more complicated CEM problems. While demonstrated with a higher order solver, the derived techniques apply to low-order methodology as well. This is the first demonstration of the applicability of adjoint-based a posteriori error estimation techniques to adaptive discretization refinement in frequency-domain CEM with arbitrary-order basis functions. This work introduces the application of dual-weighted residual error estimation and selective adaptivity based on error cancellation. The proposed targeted, adaptive mesh/model $p$ - and/or $h$ -refinement heuristics informed by adjoint element-wise error contribution estimates show near-monotonic reduction of the quantity-of-interest error with increased numbers of refined elements. In general, adjoint techniques are underutilized in CEM, and another goal of this work is to promote their future use for refinement, optimization, and uncertainty quantification.