Does an instrument rating bridge category and class?
The Airman Certification Standards for the Airplane Instrument Rating shed light on this question. There are four classes of instrument rating for airplanes and that the tasks required for each class differ:

The abbreviation(s) within parentheses immediately following a Task
refer to the category and/or class airplane appropriate to that Task.
The meaning of each abbreviation is as follows:
ASEL: Airplane – Single-Engine Land
ASES: Airplane – Single-Engine Sea
AMEL: Airplane – Multiengine Land
AMES: Airplane – Multiengine Sea
Note: When administering a test based on this ACS, the Tasks
appropriate to the class airplane (ASEL, ASES, AMEL, or AMES) used for
the test must be included in the plan of action. The absence of a
class indicates the Task is for all classes.

So your assumption is correct. You need an instrument rating in each class of airplane you wish to fly IFR. However, per §61.57 (c) (1) your   currency can be accomplished in different classes in the same category but you can’t mix and match categories e.g. 5 approaches in a SEL and 1 in a MEL is OK. 5 approaches in a SEL and 1 in a helicopter is not OK.