The short answer is all components in the chain you described have some effect on the acceleration.
The CAM software defines the waypoint through which the tool center point passes. (Let us ignore the setting when it outputs the contact trajectory). When the waypoints are defined and the feeds and speed for the segments are set this already imposes some limits on the accelerations. One such limitation comes from segments with different speeds, obviously there is an acceleration needed between these. A second limitation comes from the curvature on which the waypoints are situated. Even if the feedrate is constant, the curve will determine the acceleration of the different axes.
The CNC gets the waypoints and feed from the GCode. The CNC rounds sharp corners, adds in between waypoints based on a linear/circular/spline interpolation. Furthermore, and most importantly, the CNC adds the „time component“, it plans the velocity and acceleration profiles. The waypoints together with the velocity and acceleration profiles form the trajectory.
The trajectory is then sent each cycle (interpolation cycles can be as low as 2 ms) to the axis controllers. Each controller is responsible for executing the trajectory as precisely as they can. Usually the trajectory planner in the CNC is aware of the dynamical limits of the system and plans only executable trajectories. A stepper motor driver is a simplistic case, which has its inherent limitations in terms of smoothness (the first/second/third order continuity of the trajectory). High end CNC machines use PMSM motors.
In modern (probably since the `90s) CNC machine there are no HW components actively participating in the acceleration profile planning or execution (if we disregard the inherent limitations of stepper motors).
The main element responsible for the planning of the acceleration profile is the trajectory planner in the CNC. However this planner is limited by the waypoints it gets from the CAM tool and by the dynamical limits of the machine.