How to maintain collision while moving the player?

Well it’s a basic problem: When moving a platform (Player is grounded on it) the camera first starts shaking and then when the speed is raised (platform moves vertically up and down with raising speed) the player simply falls trough the platform following the rules of gravity.

Question is: How can I prevent that from happening?

This is a recurrent problem with the CharacterController: I suspect it only checks collision when Move or SimpleMove are used; if you don’t move the character with these instructions while the platform is moving, the character can miss the movement and simply find himself a little below the platform surface, what makes him fall. A dirty hack usually solves this problem: slightly move the character horizontally each Update - something like this:

function Update(){
  GetComponent(CharacterController).Move(Vector3.forward * 0.01 * Time.deltaTime);

You can add this code to an existing character script, or create a new one.

Alright. Make the Platform (or Plane, or whatever you have given) as the parent for the Character Controller like

CharacterController.transform.parent = Platform.transform

And do the animation for the Platform gameObject. I think, that would make it right.