But the pxmean() function in the PanelTools package does indeed appear to do essentially what I want to do. The documentation states
<<pxmean(const series y)
Compute mean value of y across all units per time period. Missing values are ignored for computing the mean.
Parameters
• y, series, target series
Returns
Series with the mean value value across all units per observation. NA values are completely ignored and are not counted.>>...and it appears that it computes my (1/N)*sum_{i=1}^N [x{it}] term, including handling the case of an unbalanced panel.