Thanks. Was all set to do something super hacky to make this work, glad I didn’t need to do that. FWIW I think this one is worthy of being put into the main plugin, though.
Also, this would help for screen reader accessibility reasons; especially on pages with multiple tables, the caption is read to screen reader users when they navigate into a table as the “label” for that table.