I think I've written something useful that seems to work well for me.
I didn't implement your suggestion as it seemed fairly complex, and I found another forum post with a slightly different form of the 'undo' based scripts that worked well for copy and paste of text or single cells, or ranges from within an instance of excel or from external programs. I've combined that with the more common version I'd found which deals with 'Auto Fill' events too, and I've added some other little enhancements.
I've acknolwedged the other forum posts which I used too. Here it is in case it is of use to other people. I'm not an expert and I expect the code could be improved, but it does what I need.
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
'Prevents user changing cell formatting by undoing the paste and pasting the value only without formatting
'Macro restricted to run on paste events to prevent the pasting of formats into the spreasheet, but not run on delete or type events
'Works with ranges and individual cells, both within the workbook Excel instance and from other instances or external programs
'A combination of:
'https://www.mrexcel.com/board/threads/force-paste-special-values.230718/
'https://stackoverflow.com/questions/45135039/excel-vba-code-to-force-values-only-paste-causes-strange-behavior-when-pasting-o
'And:
'https://answers.microsoft.com/en-us/msoffice/forum/all/how-do-you-lock-formats-but-allow-data-entry/afccc43e-e191-417f-826c-d10a464a1b9a?page=4
'A disadvantage of many macros, including this one, is that the undo history is cleared
'Macro can be disabled for spreadsheet developement by changing the Devel value used in the first IF statement of the macro
Dim Devel As Boolean
Devel = "False" 'Remember to set back to False after spreadsheet development work
If Devel = "False" Then
'In normal user mode, prevent pastes etc from changing formatting
Dim SavedVal As Variant
Dim UndoString As String
Dim srce As Range
On Error GoTo ErrHan
'Detect 'Paste' and 'Auto Fill' events in the undo list and only continue macro if these are found
UndoString = Application.CommandBars("Standard").Controls("&Undo").List(1) 'This always gives an error on spreadsheet open as the undo list is empty, but the error handling deals with it
If Left(UndoString, 5) <> "Paste" And UndoString <> "Auto Fill" Then
Exit Sub
End If
'Save the pasted value for later. This form and the use of type Variant is important in the flexibility of this macro
SavedVal = Target.Value
'Switch off events to prevent infinite loop
Application.EnableEvents = False
'Switch off screen updates
Application.ScreenUpdating = False
'Undo the user's paste
Application.Undo
'Handle 'Auto Fill' events differently. These can use the Target.PasteSpecial approach
If UndoString = "Auto Fill" Then
Set srce = Selection
srce.Copy
Target.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Application.SendKeys "{ESC}"
Union(Target, srce).Select
Else
'Set target value. This form works with all selected data which the Target.PasteSpecial approaches don't
Target.Value = SavedVal
End If
Else
'In Devel mode so the developer can unlock the spreadsheet and change formats when pasting
End If
ErrExit:
'Remember to re-enable events
Application.EnableEvents = True
'Re-enable screen updates
Application.ScreenUpdating = True
Exit Sub
ErrHan:
Resume ErrExit
End Sub