Could a modern Bofors-armed motor gunboat defeat the Franco-Spanish fleet at Trafalgar?
Short answerYes, given unlimited fuel and ammunition, because it could remain outside effective return fire while destroying crews, rigging, and ships with rapid 40 mm fire.
NotesIn this counterfactual, the British fleet at Trafalgar is replaced by a motor gunboat carrying a pair of 40 mm Bofors guns and unlimited fuel and ammunition. The proposed tactic uses the boat's speed to keep its distance and attack the Franco-Spanish fleet repeatedly, including at night. Rapid fire could clear exposed decks and shred masts, while tracer ammunition offers a means of starting fires. The operation would take a long time, and its favorable outcome depends heavily on the stipulated freedom from ammunition and fuel shortages.