I would create selectors with:
meta.class punctuation.section.block
meta.class meta.method punctuation.section.block
Those may not be 100% correct, but you get the idea. A larger number of scopes results in a stronger match. For some things this isn’t doable, but definitely would work for class/method where you know what the structure will be.
However, as I’ve mentioned before, specialization is the strongest option here. However, you are going to need to make your syntax more complex in some situations, since you can’t just include a previous context with the matches you need.