Yes. Discharge it at a fairly slow rate, so that leakage and conduction losses are balanced (somewhere between minutes and days). Dissipate the energy into a perfectly insulated calorimeter (a well enough insulated one may not exist though), or measure V and I or P and integrate over time.
The capacitance can be known quite accurately over the same time scale, and the charge is linear with voltage, so E = C Vmax^2 / 2 also applies.
Power transfer theorem doesn't apply here: that would yield 50% efficiency. We can do better.
Tim