I want camera to be positioned on the player also x axis should move continuosly by .05f in unity 2d

I am creating an 2d platformer and I am newbie to unity any help will be highly appreciatable.I want camera to be positioned on the player also x axis should move continously by .05f. And if player is not moving or stucked somewhere and if player is behind camera player(because x axis is automatically moving by .05f) then player should die. Is it doable? using cine machine or any script logic will be appreciated.