Stanton began his political career as a miners' agent at Aberdare where he was a prominent member of the Independent Labour Party. In 1904 he was elected to the Aberdare Urban District Council as a member for the Aberaman Ward. A militant, he was critical of the more moderate approach adopted by the local Labour MP, Keir Hardie.
When the United Kingdom entered the First World War, Stanton became a strong supporter of the national war effort, and publicly opposed Keir Hardie's stance opposed to the war.
Hardie's death, on 2 September 1915, a year after the outbreak of the war, caused a vacancy in one of the two Merthyr Tydfil parliamentary seats. The by-election to fill the vacancy was called for 25 November 1915.
The official Labour choice to succeed Keir Hardie was James Winstone (1863–1921). Winstone was a leader of the miners' union - a miner's agent since 1906, he had served as Vice-President of the South Wales Miners Federation since 1912, and had recently been elected President of the South Wales Federation. He had also been a County Councillor in neighbouring Monmouthshire since 1906, and was a former chairman of the Urban District Councils of both Risca and Abersychan.
In the four by-elections held in Wales since the outbreak of war, the candidate of the former member's party had been returned unopposed, in accordance with an electoral truce agreed between the parties. It was assumed therefore that the Labour Party candidate to succeed Keir Hardie would also be returned unopposed. Arthur Henderson, the Secretary of the Labour Party, wrote to the Western Mail on 17 November stating that Winstone's candidature was supported and approved by the Miners' Federation of Great Britain, the South Wales Miners' Federation, the National Executive of the Labour Party and the Merthyr constituency conference "representative practically of every organisation in the constituency", and "Accordingly, other parties have intimated their intention of observing the obligations of the party truce."