Flat material that isn't shadeless
We can use compositor tricks as you proposed.

Scene

I am going to set the scene such that the shadless objects are in one layer and the others in another.

Add another render layers to catch shading information:

I am going to create a new render layer with exactly the same layers but I am going to set the Material override to a material which is just a diffuse shader. And another one which with the same setting but with excluding the layer with the non shadless objects.

Shading layer:



Shadow layer:



Matrials

The material for the object should be as you described, an emission shader with camera ray as input.

Compositing setup

Since we enabled all passes, we cal selectively apply the only shading we want.

Example 1: Shadows that other object casted:

By subtracting the shadow if the shading layer from the shadow if the shadow layer and then inverting it, I get the shadows that were only casted from other objects and not the object itself.



Example 2: Adding highlights:

I can add the diffuse direct of the shadow layer to the result to get highlights and I can use Indirect lighting.



And you can play with passes to get exactly what you want.