This is a very old question but I can shed some light on one part of it. You say that
I could not find a way to determine which fields have to be expanded and which not.
In the schema returned by the fields REST endpoint, there is a value FieldTypeKind that tells you the type of each list. The value is an integer from this enum and from my own ...
You can send a POST request to this endpoint:
with these headers:
Authorization: "Bearer " + accessToken
X-RequestDigest "The ...