"We had to fight the enemy without in the Falklands. We always have to be aware of the enemy within, which is much more difficult to fight and more dangerous to liberty," Margaret Thatcher speech to the backbench 1922 committee, July 1984.

The Cabinet papers published under the 30-year rule lay bare the scale of Margaret Thatcher's long-held ambitions to crush the power of Britain's trade unions even before she had won her historic 144-seat majority landslide victory.

The Downing Street papers from 1983 show she told Ferdinand Mount, then head of her policy unit, that she agreed that Norman Tebbit's gradualist approach to trade union reform was too timid and that they should "neglect no opportunity to erode trade union membership".

Thatcher told Mount to put the policy work in hand but to keep his trade union reform paper, in which he referred to the unions as "a politicised mafia", wholly confidential. "We must neglect no opportunity to erode trade union membership wherever this corresponds to the wishes of the workforce. We must see to it our new legal structure discourages trade union membership of the new industries," wrote Mount.

He said that by the end of the century they also hoped to see "a trade union movement whose exclusive relationship with the Labour party is reduced out of all recognition. Again, it is absurd and unjust that millions of Conservatives, Liberals and Social Democrats should be supporting the Labour party directly or indirectly. This relationship fossilises the Labour party and stultifies the whole political dialogue."

Although the prime minister responded by saying she agreed with Mount, his demand to ensure that trade union members had to opt in, rather than opt out of the political levy – as now being contemplated by the Labour leader, Ed Miliband – was regarded as a step too far at that time by Thatcher and Tebbit because it revived the argument about the financing of political parties. The Tories feared it could also lead to a quid pro quo ban on company donations.

They were not alone in their determination to take on the unions. As early as January 1983, Nigel Lawson – who had already spent two years as energy secretary building up coal stocks in preparation for the expected showdown with the miners – was telling Thatcher: "If Scargill succeeds in bringing about such a strike, we must do everything in our power to defeat him, including ensuring that the strike results in widespread closures."

In March, Thatcher's press secretary, Bernard Ingham, also urged her to take on the miners, telling her: "Events have not, however, challenged the post-war impression of their invincibility, for we have yet to beat a national stoppage … In my view the last thing we should do today is lend credibility to Scargill."

The cabinet papers released by the National Archives on Thursday show that the preparations – including a debate among Whitehall officials over whether troops should be used during the miners' strike – were well under way. Lawson also argued for a rapid acceleration in the pace of the pit closures secretly scheduled for 1983/84, demanding that 34 pits, including a dozen in Yorkshire and the Midlands, should be listed, rather than the 20 that eventually sparked the start of the strike in March 1984.

The papers show that detailed discussions on withstanding a coal strike went on in a secret committee of Whitehall officials known as Misc 57 throughout 1983. A good deal of work had already been done in 1982, when it was decided that it was not practicable to use servicemen to move coal by rail.

By that October, in a "secret and personal" note to Thatcher, Peter Gregson, the Cabinet Office deputy secretary, was telling her that using the army to move coal by road would be a formidable undertaking: "4-5,000 lorry movements a day for 20 weeks … the law and order problems of coping with pickets would be enormous … a major risk would be the power station workers would refuse to handle coal brought in by servicemen this way".

Misc 57 had thought there might be a limited role for the troops in delivering ancillary materials, such as lighting-up oil, under close supervision.

But Thatcher was careful not to close the door on the use of the army to move coal from the working pits to the power stations, and ordered further work to be done. In the following May, the issue was reopened when the Cabinet Office derided such uses of the army as "spectacular gestures which are likely in practice to worsen the situation".

Brigadier Tony Budd, secretary of the civil contingencies unit in the Cabinet Office, took exception, pointing out that this had not been the case when the army was used for "firefighting, providing an emergency ambulance service, refuse collection and even providing emergency car parking in London", despite some union "huffing and puffing".

In the event it was the paramilitary use of the police in pitched battles with mass pickets, rather than the army, that was to lead to some of the bitterest scenes in the miners' strike.

But the ultimately successful strategy was spelled out by Lawson to his cabinet colleagues in late 1982: to do everything to undermine the miners' will to continue a lengthy strike by demonstrating that its effects were limited. The preparations particularly focused on ensuring that electricity supplies were not interrupted for a considerable period of time.