It's an interesting thought exercise, certainly. IMHO, such a lineage of arthropods wouldn't necessarily need to evolve to fill the reptiles' niche at all- they could create their own niche, relatively easily. And the arthropod pseudo-dragon concept has added merit when you consider that the closest real-world equivalent to the age-old ability attributed to dragons, that of breathing/spraying fire, is the unique defense mechanism possessed by Bombardier Beetles, which employs a exothermic biochemical reaction. Biologists have shown that the system could have evolved from defenses found in other beetles in incremental steps by natural selection.
Specifically, quinone chemicals are a precursor to sclerotin, a brownish substance produced by beetles and other insects to harden their exoskeleton. Some beetles additionally store excess foul-smelling quinones, including hydroquinone, in small sacs below their skin as a natural deterrent against predators— all carabid beetles have this sort of arrangement. Some beetles additionally mix hydrogen peroxide, a common by-product of the metabolism of cells, with the hydroquinone; some of the catalysts that exist in most cells make the process more efficient. This chemical reaction produces heat and pressure, and some other beetles exploit the latter to push out the chemicals onto the skin; this is the case in the beetle Metrius contractus, which produces a foamy discharge when attacked. And in the bombardier beetle, the muscles that prevent leakage from the reservoir additionally developed a valve, permitting more controlled discharge of the boiling poison, and an elongated abdomen to permit better control over the direction of explosive discharge.
Also, let's not forget that Bombardier Beetles are carnivorous, and they can and do fly (albeit not particularly well or quickly- with their protective wing cases being markedly thicker and more heat-resistant than those of most beetles, to protect their wings from being damaged by their own explosive boiling-hot acid spray); as well as being nocturnal and spending most of their time underground (beneath rocks), during the day, another habit commonly attributed to popular culture 'dragons'. So, IMHO, if you wanted arthropod 'dragons', you could do so by having a hypothetical member of the Adephaga (all of which have paired pygidial glands located posterodorsally in their abdomen, which are used for secreting chemicals, the origins of which appear to date back all the way to the Carboniferous-Permian boundary) evolving in an opposite direction to that Gyrinidae (aka 'Whirligigs', which increasingly appear to be a sister group to the rest of the Adephaga, having diverged from their closest relatives over 200mya). As such, instead of returning to the water, and evolving physical inorganic gills, aka 'plastrons' in order to do so, this group of Adephaga evolves towards increasing gigantism, and specializing in the active pursuit-predation of increasingly terrestrial vertebrates.
As such, they swiftly evolve past the stage of enhanced respiration, which several of the Carabids did in real life (that of 'discontinuous ventilation', whereby they utilize muscular contraction of the abdomen to alternatively expand and contract body volume, along with coordinated spiracle contraction and relaxation, to generate cyclical gas exchange/'breathing' patterns, and to reduce water loss into the atmosphere- with this having been one of the key reason why beetles remain some of the largest and heaviest insects in the world IRL, and why they're also arguably the best adapted to dry conditions), to evolve primitive pseudo-tracheal lungs (with the reduction of their number of spiracles to two or four, dedicated exclusively to either inhalation or exhalation respectivel, the increasing invagination of their tracheal trunks into primary bronchi, and the increased development of their abdominal muscles to better expand and contract their lung cavities). This enables them to better keep up with their early synapsid and anapsid prey- accomplishing this before the Permian-Triassic extinction event.
As such, the nature of this extinction event, which saw atmospheric oxygen levels continue to plummet throughout the Early Triassic to their lowest levels since the early to mid-Devonian period (at the dawn of wholesale land colonization by the first plants), and increasing levels of aridity, cements their survival, as well as increasing the success and diversification of this branch of the Caraboidea superfamily (Drakonidae?); with the selective evolutionary pressures of this time period also resulting in their primitive pseudo-tracheal lungs' further evolutionary refinement into true lungs (working via a bellow mechanism, with those abdominal muscles devoted to forceful inhalation having evolved into a psuedo-diaphragm, but with a one-way airflow of air facilitated by way of their inhalation and exhalation through separate trachea), and pseudo-hearts to more actively pump their haemolymph around their bodies.
As such, these 'Dragon Beetles' grow increasingly larger still, and though they become increasingly reluctant to fly and clumsy in the air as a result, several lineages retain the ability to do so in spite of their massive size. To support their increasingly massive weight and size, and reduce their increasing vulnerability during their exoskeletal moulting periods, their use of sclerotization (a form of tanning in which quinones are enzymatically introduced into the cuticle, and react with terminal and lysine-related amino groups in the proteins, to form stronger links between the molecules, and greatly increase the strength and rigidity of chitin) becomes increasingly sophisticated and universal; with this enabling them to support even larger sizes and heavier weights than even the long-extinct Euryterpids (aka 'Sea Scorpions', which effectively represent the upper size and weight for arthropods reliant upon the base-level strength and rigidity of unsclerotized chitin).
As with all other members of the Caraboidea superfamily, as an ancestral common trait, these early Drakonidae beetles additionally stored excess foul-smelling quinones, including hydroquinone, in small sacs below their skin- originally, as a natural deterrent against predators. And at this evolutionary stage, their increasing biological reliance upon sclerotization to structurally reinforce their increasingly large and massive exoskeletons makes these systems of sub-cuticular quinone storage sacs even more indispensable than ever; with these evolving into a system vaguely comparable to the mammalian/synapsids' system of sweat glands. The majority of these are used to store and stockpile quinone in the build-up to the moulting process. Then, immediately after the Dragon Beetle sheds and replaces its rigid exoskeleton with a new, larger version, it 'sweats' these stockpiled reserves of quinone, enabling it to flash-harden, strengthen and toughen its new exoskeleton in a fraction of the time which would otherwise be the case.
And at around the same time that contemporary proto-mammalian synapsids are evolving their specialized modified apocrine sweat glands (in the Late Triassic), a family of these Dragon Beetles (the 'true Dragon Beetles') also begins to evolve specialized modified quinone sweat glands of its own; enlarged ones, specially evolved to mix hydrogen peroxide with the hydroquinone in them, withstand the excess heat and pressure generated by the resulting explosive biochemical reaction, and then funnel and direct the explosive discharge upon its release- not just against potential predators (as juveniles, after first emerging from their pupal stage), but also to incapacite or even kill their prey (becoming larger and heavier still, as they make the shift from pursuit to ambush predation).
Though with their far greater size, these 'fire glands' capacities and fuel reserves are massively greater than those of their distant cousins the bombardier beetles', and thus the maximum temperature, pressure, volume and range of the corrosive, boiling spray/'fire' that they can spew out is far greater. And their ranged weaponry also renders in-flight attacks a viable strategy, with a sub-family subsequently evolving to become lighter, more streamlined and more specialized to an aerial lifestyle. So, what do you reckon? Sounds relatively plausible, at each evolutionary step along the way?