As for oaths we may read in the Qur'an:
Allah will not impose blame upon you for what is meaningless in your oaths, but He will impose blame upon you for [breaking] what you intended of oaths. So its expiation is the feeding of ten needy people from the average of that which you feed your [own] families or clothing them or the freeing of a slave. But whoever cannot find [or afford it] - then a fast of three days [is required]. That is the expiation for oaths when you have sworn. But guard your oaths. Thus does Allah make clear to you His verses that you may be grateful. (5:89)
In the sunnah we may read:
Verily Allah has pardoned [or been lenient with] for me my ummah: their mistakes, their forgetfulness, and that which they have been forced to do under duress.
(Imam an-Nawawi commented in his 40 ahadith: A hasan hadeeth related by Ibn Majah, and al-Bayhaqee and others.)
And there's a hadith which has some weaknesses in Sunan ad-Daraqotni explicitly saying that an oath for forced person doesn't count:
ليس على مقهور يمين
Note that swearing or making an oath by placing a hand on the Moshaf (a written copy of the Qur'an) is an innovation and has no source in the teachings of Islam. (See also islamqa #98194).
In the following fatwa on islamqa #3139 on a wife who has been forced to swear to say the truth about something of her past has been informed that she might even lie in case of fear and the only expiation in her case would be repentance. In a more general case islamqa #119719 -in Arabic only- it is said that there's no expiation needed in case of a forced oath.
The hanbali scholar ibn Qudamah said in his al-Mughni المغني (Vol. 11 case 8071):
Note: If I'm translating from Arabic -else I would quote a source of the translation-, this is my own translation take it with the necessary care!
مبنى اليمين على نية الحالف ، فإذا نوى بيمينه ما يحتمله ، انصرفت يمينه إليه ، سواء كان ما نواه موافقا لظاهر اللفظ ، أو مخالفا له ،...
The basis of an oath is the intention of the person making it, so if he/she intended by this oath what he/she is capable to realize, then his/her oath is referring to that, regardless if what h/she intending is fully in accordance to what he/she actually said or deviating from it ...
He also added that this is the view of imam Malik while a-Shafi'i and abu Hanifa said that the niyyah (intention) is irrelevant as the oath is fixed by its wording. Ibn Qudamah also gave examples of oaths and intentions.
This is just to show that the matter of oaths is discussed among scholars. Note that the matter and the difference of opinion is even more difficult when it comes to oaths on a court.
He also said earlier in his al-Mughni (Vol 9 case 7940) about forced oath and quoted the hadith from ad-Daraqotni as among the evidences:
ولا تنعقد يمين مكره . وبه قال مالك ، والشافعي . وقال أبو حنيفة : تنعقد ; لأنها يمين مكلف ، فانعقدت ، كيمين المختار .
An oath is not valid (or void) for a person that has been forced, this is the view of Malikm and a-Shafi'i while abu Hanifa say it is valid as it is an oath of a mukallaf (a person that has reached the age of being mature) so it is considerd as valid equal to that of a person who made it willingly.
They also used as evidence verse (16:106):
...except for one who is forced [to renounce his religion] while his heart is secure in faith. ...
As you already assumed in your post a forced oath doesn't count based on the view of the majority of scholars and there's no expiation from it.