It is documented here:
Regarding the JOSM parameters, see also:
https://josm.openstreetmap.de/wiki/Maps#WebMapServicesWMS
I have already done this with another imagery:
As @vorpalblade-kaart has already pointed out, this is probably due to the max zoom level. The desired max zoom level can be specified at the beginning of the URL in JOSM:
wms[22]:https://geoservices.mapleridge.ca/image/rest/services/Orthoimagery/2023_7_5cm/ImageServer/exportImage?f=image&bbox={bbox}&bboxSR={wkid}&imageSR={wkid}&size={width},{height}&format=jpgpng