You can turn on "privacy" for notifications -- this is in app settings under message notifications. Then you will see just "X unread messages", and no action buttons etc.
Overall -- whether a "enhanced" notification is shown collapsed or expanded is fully controlled by "the system" (Android, not the military-industrial complex

)
I think the idea is that the system knows how much room there is, how many notifications, etc. In any case, this is not something I can control from application code.