Are the amounts shown boxes 4 and 6 of the W2 form (Social Security and Medicare tax withheld) deducted at any point from the amount shown in box 1 (wages, tips, other compensation) to calculate the federal taxable income?
No, the boxes 4 and 6 don't play a role in reducing your taxable income on the return. But, they do appear on the return sometimes. Box 4 only plays a role on your tax return if, for example, you had two or more jobs during the year and your total Social Security exceeded the limit for 2018. You would get a credit for the difference.
The same goes for box 6. If your investment income exceeds the threshold, you may be subject to the additional Medicare tax. That reconciliation is done on form 8959 and tax is assessed on your tax return.