Is it possible to modify or extend pre-existing Gazebo Sim plugins?

Question
Is it possible to modify or extend a pre-existing Gazebo Sim (Garden) plugin, such as the gz-sim-multicopter-control-system plugin to publish the quadcopter rotor velocities as Gazebo topics? How can this be done?

Summary
I am using Gazebo Garden (gz-sim7) to simulate a quadcopter. I have implemented two of Gazebo's pre-existing plugins for the quadcopter model flight. The plugins are gz-sim-multicopter-motor-model-system and gz-sim-multicopter-control-system, and their use in the model.sdf file is shown below. You can also find a more detailed version of the plugin implementation at multicopter_velocity_control.sdf.

<?xml version="1.0"?>
<sdf version="1.8">
    <model name="quadcopter">
        <!-- The links of the quadcopter model -->
        <!-- The links of the quadcopter model -->

        <!-- Multicopter Motor Model plugin for each rotor -->
        <!-- Rotor 0 -->
        <plugin
            filename="gz-sim-multicopter-motor-model-system"
            name="gz::sim::systems::MulticopterMotorModel">
            <robotNamespace>quadcopter</robotNamespace>
            <jointName>rotor_0_joint</jointName>
            <linkName>rotor_0</linkName>

            <!-- More Multicopter Motor Model plugin components -->

            <commandSubTopic>gazebo/command/motor_speed</commandSubTopic>
            <actuator_number>0</actuator_number>
            <motorSpeedPubTopic>motor_speed/0</motorSpeedPubTopic>
            <motorType>velocity</motorType>
        </plugin>

        <!-- Similarly define Rotor 1, Rotor 2 and Rotor 3 -->

        <!-- Multicopter Control plugin -->
        <plugin
            filename="gz-sim-multicopter-control-system"
            name="gz::sim::systems::MulticopterVelocityControl">
            <robotNamespace>quadcopter</robotNamespace>
            <comLinkName>base_link</comLinkName>
            <commandSubTopic>gazebo/command/twist</commandSubTopic>
            <enableSubTopic>enable</enableSubTopic>

            <!-- More Multicopter Control plugin components -->

            <rotorConfiguration>
                <rotor>
                    <jointName>rotor_0_joint</jointName>

                    <!-- More Multicopter Control plugin rotor configuration components -->

                </rotor>

                <!-- Similarly configure Rotor 1, Rotor 2 and Rotor 3 -->

            </rotorConfiguration>
        </plugin>
    </model>
</sdf>
Is it possible to publish the rotor velocities using Gazebo topics? If not, is it possible to modify or extend the functionalities of the pre-existing plugins to publish the rotor velocities to topics after calculating them?

Further Info
I am using Gazebo Garden and ROS 2 Humble for this project. I have used the Gazebo's ros_gz_project_template as a starting framework for my project. There are four main packages in the workspace (my_package_application, my_package_bringup, my_package_description and my_package_gazebo), and the src directory looks something like this.

src
├── ros_gz
├── sdformat_urdf
├── my_package_application
├── my_package_bringup
├── my_package_description
│   ├── CMakeLists.txt
│   ├── hooks
│   ├── include
│   │   └── my_package_description
│   │       └── MotorVelocityPublisher.hh
│   ├── models
│   │   └──quadcopter
│   │       ├── model.config
│   │       └── model.sdf
│   ├── package.xml
│   └── src
│       └── MotorVelocityPublisher.cc
└── my_package_gazebo
    ├── CMakeLists.txt
    ├── hooks
    ├── include
    ├── package.xml
    ├── src
    └── worlds
        └── quadcopter.sdf
My initial idea was to create a custom plugin called MotorVelocityPublisher which would access the rotor velocity data from the gz-sim-multicopter-control-system but the plugin doesn't make the rotor velocity data easily accessible.

I have also thought about modifying or extending the existing gz-sim-multicopter-control-system plugin to publish the rotor velocity data. More specifically, creating a new RotorVelocitiesComponent.hh component to store the rotor velocity values.

// RotorVelocitiesComponent.hh

#ifndef ROTOR_VELOCITIES_COMPONENT_HH_
#define ROTOR_VELOCITIES_COMPONENT_HH_

#include <gz/sim/components/Component.hh>

namespace multicopter_control
{
    // Define a new Gazebo component to store rotor velocities
    GZ_SIM_DEFINE_COMPONENT(RotorVelocities, std::vector<double>)
}

#endif  // ROTOR_VELOCITIES_COMPONENT_HH_
Extending the PreUpdate method in the MulticopterVelocityControl.cc library to save the rotor velocity values into the component.

// Add the component header in MulticopterVelocityControl.cc
#include "RotorVelocitiesComponent.hh"

// Existing Multicopter Velocity Control methods

void MulticopterVelocityControl::PreUpdate(
    const UpdateInfo &_info,
    EntityComponentManager &_ecm)
{
    GZ_PROFILE("MulticopterVelocityControl::PreUpdate");

    // Existing code for the Multicopter Velocity Control Pre-Update

    this->velocityController->CalculateRotorVelocities(*frameData, cmdVel,
                                                       this->rotorVelocities);

    // New code to store the rotor velocities in the component
    auto rotorVelocitiesComp = _ecm.Component<multicopter_control::RotorVelocities>(this->model.Entity());
    if (!rotorVelocitiesComp)
    {
        _ecm.CreateComponent(this->model.Entity(), multicopter_control::RotorVelocities(this->rotorVelocities));
    }
    else
    {
        rotorVelocitiesComp->Data() = this->rotorVelocities;
    }   // New code ends here

    this->PublishRotorVelocities(_ecm, this->rotorVelocities);
}
The problem with this solution is that I don't know how to correctly save the extended gz-sim-multicopter-control-system plugin, build it, link it, etc. I'm not sure if this method will work or not.