RE: Assign records to ex manager when changing to new manager
You can create a plugin that will execute on the Update of the User record (when the manager field changes).
You will need to create an Pre-Image of the entity (before the change), so that you can get the old manager id.
Within your plugin, call the ReassignObjectsSystemUserRequest as shown below:
ReassignObjectsSystemUserRequest req = new ReassignObjectsSystemUserRequest();
//The user who's records will be reassigned
req.UserId = new Guid("ASSIGN_FROM_USER_GUID");
//The new user to receive the records
req.ReassignPrincipal = new EntityReference("systemuser", new Guid("ASSIGN_TO_USER_GUID"));
ReassignObjectsSystemUserResponse resp = (ReassignObjectsSystemUserResponse)service.Execute(req);
Hope this helps.