How to encapsulate blueprint character within c++ class

Hello, I am not new to unreal, but I am using it for other purposes so this isn’t for a game. I am using the Epic supplied Animation Sample Project which has a suite of useful animations I need for my project (and as documented it is a good starting place for continuing to build/add more). Running the project allows me to control the player inside the level and test out all the animations, basically what I need to do, is encapsulate that functionality inside a single C++ class that allows me to: 1. spawn the blueprint character, 2. control the character via sending it the same keystrokes that i would be pressing if i was controlling it.

I will be using multiple instances of this class within a single level and I have at this point had no problem spawning in the character with this code:
const FString BlueprintPath = TEXT(“/Game/Blueprints/CBP_SandboxCharacter.CBP_SandboxCharacter_C”);
if (!GetWorld())
{
GEngine->AddOnScreenDebugMessage(-1, 15.0f, FColor::Red, “Invalid World Context!”);
UE_LOG(LogTemp, Warning, TEXT(“Invalid World Context!”));
return;
}

// Dynamically load the blueprint class
UClass* BlueprintClass = LoadObject<UClass>(nullptr, *BlueprintPath);
if (!BlueprintClass)
{
    FString ErrorMessage = FString::Printf(TEXT("Failed to load Blueprint at path: %s"), *BlueprintPath);
    GEngine->AddOnScreenDebugMessage(-1, 15.0f, FColor::Red, ErrorMessage);
    UE_LOG(LogTemp, Error, TEXT("Failed to load Blueprint at path: %s"), *BlueprintPath);
    return;
}

// Define spawn parameters
FActorSpawnParameters SpawnParams;
SpawnParams.SpawnCollisionHandlingOverride = ESpawnActorCollisionHandlingMethod::AdjustIfPossibleButAlwaysSpawn;

// Specify spawn location and rotation
FVector SpawnLocation = FVector(0.f, 0.f, 100.f); // Adjust as needed
FRotator SpawnRotation = FRotator::ZeroRotator;

// Spawn the character
ManagedCharacter = GetWorld()->SpawnActor<ACharacter>(BlueprintClass, SpawnLocation, SpawnRotation, SpawnParams);
if (ManagedCharacter)
{
    // Ensure the character has gravity and proper collision
    UCharacterMovementComponent* MovementComponent = ManagedCharacter->GetCharacterMovement();
    if (MovementComponent)
    {
        
        MovementComponent->SetMovementMode(EMovementMode::MOVE_Walking); // Ensure walking mode
        MovementComponent->GravityScale = 1.0f; // Enable gravity
        MovementComponent->bOrientRotationToMovement = true; // Orient character to movement
    }

    // Enable collisions for the capsule component
    UCapsuleComponent* CapsuleComponent = ManagedCharacter->GetCapsuleComponent();
    if (CapsuleComponent)
    {
        CapsuleComponent->SetCollisionEnabled(ECollisionEnabled::QueryAndPhysics);
        CapsuleComponent->SetSimulatePhysics(false); // Ensure physics simulation is off for walking characters
    }

    // Make sure the character is initialized properly
    ManagedCharacter->SetActorEnableCollision(true); // Ensure the actor has collision enabled
    ManagedCharacter->SetReplicates(true); // Optional: Enable replication if needed
    ManagedCharacter->FinishSpawning(FTransform(SpawnRotation, SpawnLocation)); // Finalize spawning process

from here, I pass a controller:
APlayerController* PlayerController = GetWorld()->SpawnActor(APlayerController::StaticClass());
if (PlayerController)
{
PlayerController->Possess(ManagedCharacter); //TODO this?

if (PlayerController == ManagedCharacter->GetController()) {
    GEngine->AddOnScreenDebugMessage(-1, 15.0f, FColor::Green, "Controller set");

    

}
else {
    GEngine->AddOnScreenDebugMessage(-1, 15.0f, FColor::Green, "Controller fail");
}

}

but for the life me cannot figure out how to get the controller to activate the trigger events that seem to functionally control the blueprint character, I am aware that there are inputactions inside the input folder that the blueprint uses, as well as an IMC, but am not sure how to utilize them with the controller (there is also a sandbox controller for this, but it doesnt seem to have any integral functionality)

I could get the character to move with the following code, but this doesnt feel correct as it feels like im overriding the functionality of the blueprint and it also only plays the jogging animation and speed so im not sure how to change it:
FVector ForwardDirection = ManagedCharacter->GetActorForwardVector();
ManagedCharacter->AddMovementInput(ForwardDirection, 1.0f);

to clarify some of the requirements here:
I did mention that I would like to send it the “keystrokes”, but I basically just mean I need to force the blueprint’s events to trigger as if it was being controlled from the viewport, also localplayer() is not an option as there will be multiple instances live in a level at once, and the spawn/control functionality must be within the c++ to integrate with my other code. I feel like this should be a lot easier than im making it, many thanks for any help provided.