You're not really trying to produce a reasonable representation of a single wavelength because, as you have noted, an RGB color reproduction system is not capable of doing that. (Unless that wavelength of light happens to coincide with one of the wavelengths used for either red, green or blue by the emissive RGB system and if the display used emits a very narrow band for each color it uses. Most displays do not emit narrow color bands for the three colors they use, and even fewer displays emit a pure spectral color as one of those three.)
What you're actually trying to do is produce a similar retinal response in humans that would occur if a human perceived a specific wavelength. You can reproduce many colors that humans can perceive by varying the intensity of the each of the three color channels used by RGB color reproduction systems.
Unfortunately, the short answer is that for many pure spectral colors, you can't reproduce the same retinal response using emissive RGB color reproduction systems. If why this is so were a "relationship status" (Single, Married, Taken, etc.), the explanation for this would be "It's Complicated." We'll try to break it down briefly below, but to do so we're going to have to leave pure spectral colors behind for a bit and talk about how our color reproduction systems can emulate many of the things we see in the world around us.
There are reams of material that discuss how this may be accomplished and most are far too involved to attempt to summarize here in one answer. One of my favorites that is reasonably brief and uses "layman's terms" is this basic course on color reproduction hosted on Memcode. I'll use a few illustrations from it below. Various aspects of color reproduction have been covered in a wide variety of existing questions here at Photography SE.
Here are a few of them:
Why are Red, Green, and Blue the primary colors of light?
What does an unprocessed RAW file look like?
RAW files store 3 colors per pixel, or only one?
Why don't mainstream sensors use CYM filters instead of RGB?
Why are camera sensors green?
Why do we use RGB instead of wavelengths to represent colours?
As they apply to this question, the basic answer is that human vision is trichromatic. The three types of cones in the human retina are most sensitive to light at approximately 420, 534, and 564 nanometers. But each type of cone is also sensitive to a much wider range of wavelengths on each side of those peaks. Please note that though the three types of cones may be identified as "red", "green", and "blue", their peak sensitivities do not correspond to the three wavelengths of light used by RGB color reproduction systems. This is particularly the case with L-cones that are most sensitive to 564nm yellow-green light, even though we have been calling them our "red" cones since long before we could accurately measure the actual peak sensitivities of each of the three types of retinal cones.

Our color cameras are usually covered by a Bayer Mask with filters that are what we call "red", "green", and "blue". Our Bayer Masked sensor use colors that mimic (though not exactly) the sensitivities of our retinal cones. They're usually most sensitive to around 460, 540, and 600 nanometers. 600nm is a yellowish-orange color. There are no true 'Red' filters in a Bayer mask, all of the cute little drawings on the internet notwithstanding.

On the other hand, RGB color reproduction systems usually emit light at about 460, 525, and 640 nanometers. The specific colors can vary widely from one display to the next. Some four-color emissive displays also have a yellow channel at about 580nm, which is actually closer to the the 564nm peak sensitivity of our "red" cones than the 590-600nm peak of the "red" filters on our Bayer Masks or the 640nm light emitted by the 'Red' channel of our RGB color reproduction systems.
Here's a graph that shows the sensitivity of a specific CMOS color sensor. I've drawn vertical lines that correspond to typical RGB and RYGB emissive displays.

It should be fairly obvious from the graph that one can't just take the raw illuminances measured by a Bayer masked sensor and take the monochrome luminance values from each "red", "green", and "blue" filtered photosite and feed them to an RGB emissive display and expect to produce anywhere near the same human retinal response that the original scene produced. The raw values from a digital camera's sensor must be processed to give an RGB value for each pixel in an image, as well as transform the linear response of a digital sensor to the logarithmic (with an S-curve at the upper and lower bounds) response of human vision to differences in brightness.
The following section draws upon material included in the color course hosted at Memcode linked above.
Most of the things we see in the world around us emit or reflect a distribution of various wavelengths of light. We call this the spectral distribution of an object.

Note that the HeNe laser has a single vertical line at about 633nm. The other things show a wide spectral distribution. Also notice that "LCD Blue" and "LED Red", two of the colors emitted by different types of RGB displays, have a moderately wide spectral distribution.
Now let's look at the spectral distribution of white light reflected off of a lemon versus the spectral distribution of a (color correct) picture of that lemon on an emissive RGB screen.

How do our eyes see the same color for these different spectral distributions?


Even though the shape of the area of the response is different for each of the cones, the total area of each response is the same! It's the total area that determines the strength of the signal from each cone that is sent to our brain for processing into our perception of what stimulates our retinal cones.

Now let's go back and look at all of the colors humans can perceive. This is often illustrated using a graph in CIE color space.
From Wikipedia:
The CIE 1931 color spaces are the first defined quantitative links between distributions of wavelengths in the electromagnetic visible spectrum, and physiologically perceived colors in human color vision.

The CIE 1931 color space chromaticity diagram. The outer curved boundary is the spectral (or monochromatic) locus, with wavelengths shown in nanometers. Note that the colors your screen displays in this image are specified using sRGB, so the colors outside the sRGB gamut are not displayed properly. Depending on the color space and calibration of your display device, the sRGB colors may not be displayed properly either.
Pure spectral colors fall along the dark black line on the outer edge of the curve.
Now let's superimpose the color gamut that shows what a three color emissive display can reproduce based on the three colors it emits (shown as the corners of a triangle):

Notice that the edge of the CIE color space where the pure spectral colors are located are outside of the triangle that can be reproduced by the three colors at the corners of the triangle!
Here's a slightly more sophisticated graph that shows a wide variety of commonly used color spaces for emissive color reproduction systems. It's from this page at Clarkvision.com, which is another excellent resource for learning about color reproduction.

As you can see, what is by far the most commonly used color space by emissive color displays worldwide, sRGB, does not include any pure spectral colors. Neither does the second most common one used by most more advanced emissive displays, AdobeRGB. Some fairly recent (and far less common) wide gamut devices use color spaces that are even wider than AdobeRGB. DCI-P3 and Rec2020 are two such very wide gamut color spaces that a few high end monitors can reproduce with a high degree of coverage. Rec2020 is spectrally defined with Red, Green, and Blue primaries at 467, 532, and 630 nanometers respectively. Because of the shape of the spectral locus, which is not triangular in shape when plotted on a CIE grid, the remaining pure spectral colors that humans can perceive cannot be created by any RGB emissive color system technologies.
To get to the left of the line between 467nm and 572nm in the Rec2020 color space and produce a retinal response equivalent to, say, a pure wavelength of 500nm, one would need to produce a negative value for Red at 630nm. That is, one would need for the retina's L-cones ("red" cones) most sensitive to about 564nm to somehow subtract from the signal going to the brain created by the display's Green channel emitting at 572nm while also allowing a significant response from the M-cones ("green" cones) most sensitive to about 534nm.