"Is he right?" No.
First we need a bit of context about how these concentration camps came about. Rees-Mogg is essentially correct that the idea of the camps was for the protection of the locals, but he completely misses what they were being protected from (British tactics), the wider strategy that these camps formed a part of (scorched earth and blackmail), and the immense suffering that took place in many of these camps (disease and starvation).
Context - The Boer War in 1900
In early 1900, the war was not going well for Britain. Much of the blame fell on General Buller, commander of British forces in the region, for his poor planning of military operations which led to high casualties and a frequent need to retreat from counter-attack. He was replaced by Field Marshall Roberts who overhauled the military leadership in the region, and brought with him tens of thousands of men in reinforcements. As of March 1900, the British had nearly 200,000 men in southern Africa led by an able leader. In the spring and summer of 1900, the crucial towns of Kimberly, Mafeking, Johannesburg, Pretoria, and Ladysmith were made secure by the British. The Boers suffered defeat after defeat. On September 3rd 1900, Roberts declared that the war was over - mission accomplished! Roberts was removed from South Africa and replaced by Lord Kitchener, who was tasked with what the British believed would be a simple consolidation of control. Obviously, the war wasn't over. The Boers had simply decided not to fight the British directly since they could not win, and turned to the tactics of guerilla insurgency.
The Boers were divided into small groups which acted against the British at every opportunity. They sabotaged infrastructure and attacked small columns of British troops. They were often sheltered by locals and, because southern Africa is very big, they had plenty of space to hide from inevitable British searches for them. Lord Kitchener led three searches for the famed Boer general Piet De Wet, who was thought to be coordinating these attacks, with no results.
To counter Boer raiding, the British initially built blockhouses - little fortified buildings that were designed to house up to 10 men (due to a lack of soldiers it was usually 6 or 7 men). These were constructed along supply routes and at key points of infrastructure such as bridges. They were very effective at protecting British supply routes, but not so effective at actually fighting the Boer guerillas as they could still move around the plains and strike weak points. To restrict their movement, the blockhouse idea was expanded, and blockhouses were linked with barbed wire fences to effectively parcel up the land of southern Africa into pens. To get from one 'pen' to another, the Boers would have to cut through the fence. Even if they did get through, a passing patrol would notice that the Boers were nearby and a search could be launched. Eventually 8000 blockhouses were built.
It quickly became apparent that even this was not enough to pin down the Boer guerillas because they were being sheltered by local communities. Local communities also provided food and ammunition to the Boers, so the British decided to burn those communities to the ground. The scorched earth policy adopted by the British in late 1900 and involved the destruction of farms, the poisoning of wells, and the mass internment of local populations. There was also the morale impact of having your people put in camps, which Kitchener did pick up on and intended to exploit it to get the Boers to attend peace talks.
Rees-Mogg's comment that "People were taken there so that they could be fed, because the farmers were away fighting the Boer War" is complete and utter crap. It was part of a coordinated and deliberate effort to deprive Boer fighters of refuge by systematically destroying farming communities across British territory in southern Africa. They were also used to make tens of thousands of innocent people into leverage.
(Rees-Mogg also seems to think that women and adolescents can't run a farm without a man supervising them, but that's a whole different problem)
The Camps - 1900-1902
It was deemed too dangerous to keep Boer men of fighting age interned in Africa, so most of them were sent to overseas camps. This had been British policy since the beginning of the war, and by its end in 1902 25,630 men had been interred overseas out of around 28,000 male Boer prisoners. At the start of the war, there were a couple of refugee camps, which were largely voluntary and at the start were decently supplied, but when Kitchener began his new strategy these deteriorated quickly and the new camps (there were eventually 109 camps in total) were poorly provisioned from the start. The people in the concentration camps of southern Africa were overwhelmingly women and children. These camps had poor medical provisioning, terrible hygiene, and insufficient supplies of food (that'll happen when you burn the farms). An infamous image of Lizzie Van Zyl shows severe malnourishment: https://upload.wikimedia.org/wikipedia/commons/b/ba/LizzieVanZyl.jpg This was far from abnormal in the camps, and was most certainly not happening in Glasgow on this scale. I should point out that this was not deliberate, but the result of maladministration and incompetent neglect.
In 1901 the journalist Emily Hobhouse visited these camps, and took photographs. What she saw shocked her, and shocked the nation when she reported on it. Politicians were initially reluctant to look into the matter, since the Liberal Party was divided on the issue of the Boer War and their leader (Henry Campbell-Bannerman) did not wish to exacerbate factionalism in his party, and naturally the governing Conservative Party did not wish to engage with the issue either since they were responsible. However, some in the Liberal Party heard Hobhouse out and raised the issue in Parliament, most notably David Lloyd-George. You can read a House of Commons debate begun by Lloyd-George on the subject here: https://api.parliament.uk/historic-hansard/commons/1901/jun/17/south-african-war-mortality-in-camps-of#S4V0095P0_19010617_HOC_276
The government said the camps were voluntary and conditions were adequate. This was an obvious attempt to portray the camps as being like the earliest refugee camps and deny the issue. Angered by this, and armed with Hobhouse's evidence, the Liberal Party galvanised and Campbell-Bannerman decided to make it a major political issue. This coincided with Hobhouse's authoring of a consolidated report into the camps in June 1901 (https://babel.hathitrust.org/cgi/pt?id=uiuc.2776304;view=1up;seq=5). With the dire conditions of the camps now public knowledge, Campbell-Bannerman made a now semi-famous speech in which he said "When is a war not a war? When it is carried on by methods of barbarism in South Africa". In July, the government requested a full report on the camps from Lord Kitchener. Kitchener reported that 93,940 Boers and 24,457 black Africans were in "camps of refuge" and it was noted that the death rate among the camps was oddly high, especially among children. In response to the outcry this caused, the government appointed an independent commission to look into the matter, which became known as the Fawcett Commission after its leader, Millicent Fawcett.
The Fawcett Commission's investigation concluded that Kitchener was actually underestimating the number of internees and the number of deaths. The government had expected the report to be fairly positive, or at least neutral, about the camps, but Fawcett went even further in criticising them than Hobhouse. After the war, another report found that the Boer camps had a 25% fatality rate whilst the camps for black Africans had a fatality rate of at least 12%, though the government had kept much poorer records of those camps so it was much harder to estimate. It should go without saying that 25% of Glaswegians did not die from 1900-1902 - Rees-Mogg's comparison is factually wrong and monumentally stupid, never mind the problems of comparing a city to a network of concentration camps in the first place.
A digitised version of the Fawcett Commission's report can be found here: https://archive.org/details/ReportOnTheConcentrationCampsInSouthAfricaByTheCommitteeOfLadIes/page/n11
This report did have an impact and conditions in the camps did improve. Basic improvements in hygiene and medical provisioning meant that typhoid and measles did not spread as much and, although conditions were still terrible, the fatality rate went down dramatically in the last months of the war. Kitchener also gave orders to stop bringing people into the camps, as he woke up to the humanitarian disaster he had caused. However, he did not stop the scorched earth policy.
Therefore, Rees-Mogg is talking out of his backside, and through either accidental or wilful ignorance does not acknowledge the enormity of the suffering in these camps or the inhumane tactics that created the crisis, and he fails utterly to acknowledge the diligent work of Emily Hobhouse and Millicent Fawcett's commission.
It is good that you have sought reputable answers and been skeptical of the claims made by Rees-Mogg. The harm done by these camps was appalling even by the standards of the late Victorian/early Edwardian era and these dreadful episodes of British history should not be ignored or minimised.
Sources:
Lucking, Tony. "Some Thoughts on the Evolution of Boer War Concentration Camps." Journal of the Society for Army Historical Research 82.330 (2004): 155-162.
Morgan, Kenneth O. "The Boer War and the media (1899–1902)." Twentieth Century British History 13.1 (2002): 1-16.
Pakenham, Thomas. The Boer War. Hachette UK, 2015.
Spies, S. Burridge. Methods of Barbarism?: Roberts and Kitchener and Civilians in the Boer Republics, January 1900-May 1902. Human & Rosseau, 1977.
Firstly, Rees-Mogg's claim that the camps were set up for the safety of the inhabitants is correct, but only initially:
The first two of these camps (refugee camps) were established to house the families of burghers who had surrendered voluntarily, but very soon, with families of combatant burgers driven forcibly into camps established all over the country, the camps ceased to be refugee camps and became concentration camps.
It would be disingenuous, however, to speak of the camps as they were in the early part of the Boer War, for this is not the period of time that people take issue with; rather, it was after Kitchener's accession to overall commander in November 1900, and his adoption of a scorched earth policy, that conditions in the concentration camps rapidly deteriorated. The details of the terrible conditions were brought to light in the Hobhouse report; the specifics do not relate so much to your question, so I won't quote too much, but one quote reads:
Some people in town still assert that the Camp is a haven of bliss. I was at the camp to-day, and just in one little corner this is the sort of thing I found – The nurse, underfed and overworked, just sinking on to her bed, hardly able to hold herself up, after coping with some thirty typhoid and other patients, with only the untrained help of two Boer girls–cooking as well as nursing to do herself. Next tent, a six months' baby gasping its life out on is mother's knee. Two or three others drooping sick in that tent.
Safe to say, if the camps were for the protection of their occupants, they did not do a particularly good job.
It is more difficult to judge the authenticity of Rees-Mogg's claim that mortality rates in the camps and the contemporaneous Glasgow were comparable. In 1901, in the whole of Scotland, there were 80,107 deaths. The population of Scotland at the time was 4,472,103, which means that the mortality rate was about 18 people per 1000. Meanwhile, in the British concentration camps, Between June 1901 and May 1902, there were 115,000 inhabitants, and 28,000 of them died, about 22,000 of which were children. Note that these figures are only of Boer deaths, and some 20,000 indigenous Africans died at other camps. However, I don't have figures for the populations of those camps, so I will not include them in this calculation. The statistics regarding the camps with Boers amount to a mortality rate of around 243 people per 1000. However, this is comparing the camps to the entirety of Scotland. As late as 1898, the infant mortality rate in Glagow Gorbals was 200 per 1000 live births, though Glasgow Gorbals is noted in this study to be among the poorest areas of Glasgow. Therefore, whilst there are not specific figures (that I could find), the mortality rate in the camps was significantly larger than in Scotland, and larger than the infant mortality rate in one of the poorest areas within Glasgow. Since 1960, the worldwide infant mortality rate has been significantly higher than the general mortality rate, so one can extrapolate that Rees-Mogg is wrong, and the mortality rate in the camps was, in fact, higher than in Glasgow.